Positioner

View on GitHub

Introduction

The Positioner component is a utility component to help with positioning an element to an anchor. It is used as a helper component throughout Evergreen in components such as Tooltip and Popover.

Positioner Props

positionPosition.TOP | Position.TOP_LEFT | Position.TOP_RIGHT | Position.BOTTOM | Position.BOTTOM_LEFT | Position.BOTTOM_RIGHT | Position.LEFT | Position.RIGHT
The position the element that is being positioned is on. Smart positioning might override this.
isShownbool
When true, show the element being positioned.
childrenfuncrequired
Function that returns the element being positioned.
bodyOffsetnumber
The minimum distance from the body to the element being positioned.
targetOffsetnumber
The minimum distance from the target to the element being positioned.
targetfuncrequired
Function that should return a node for the target. ({ getRef: () -> Ref, isShown: Bool }) -> React Node
initialScalenumber
Initial scale of the element being positioned.
animationDurationnumber
Duration of the animation.
onCloseCompletefunc
Function that will be called when the exit transition is complete.
onOpenCompletefunc
Function that will be called when the enter transition is complete.