Skip to main content
Version: Next

Positioner API

import { Positioner } from '@editora/ui-react';

Props​

PropTypeDescription
anchorstring
crossOffsetnumber
fitViewportboolean
flipboolean
headlessboolean
matchWidthboolean
offsetnumber
onPositionChange(detail: PositionerStateDetail) => void
openboolean
placement| 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end'
shiftboolean
strategy'fixed' | 'absolute'

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

Element: <ui-positioner>​

Positioner renders the ui-positioner custom element from @editora/ui-core, which can also be used without React.

Attributes: anchor, auto-placement, boundary-padding, cross-offset, dir, fit-viewport, flip, headless, hide-when-detached, inline, match-width, offset, open, placement, shift, strategy

Events: position-change