Content
Dropdown menu content portal with positioning, animation, and focus management
| Prop | Type | Default |
|---|---|---|
| container# | Element | DocumentFragment | nullPortal container; defaults to document.body | — |
| sideOffset# | numberOffset from trigger button | 6 |
| side# | 'top' | 'right' | 'bottom' | 'left'Preferred side to display content | — |
| align# | 'start' | 'center' | 'end'Alignment relative to trigger | — |
| alignOffset# | numberOffset from alignment edge | — |
| avoidCollisions# | booleanAutomatically flip side/align to avoid viewport collisions | — |
| collisionBoundary# | Element | Element[] | nullElements to consider as collision boundaries | — |
| collisionPadding# | numberPadding from collision boundaries | — |
| strategy# | 'fixed' | 'absolute'Positioning strategy | — |
| sticky# | 'partial' | 'always'Whether content sticks to trigger during scroll | — |
| hideWhenDetached# | booleanHide when trigger no longer visible | — |
| updatePositionStrategy# | 'always' | 'optimized'Position update frequency | — |
| loop# | booleanEnable keyboard focus looping | false |
| forceMount# | booleanForce mount content even when closed | — |
| onCloseAutoFocus# | (event: Event) => voidCallback when auto-focusing on close; returns focus to trigger by default | — |
| onEscapeKeyDown# | (event: KeyboardEvent) => voidCallback when escape key is pressed | — |
| onPointerDownOutside# | (event: PointerDownOutsideEvent) => voidCallback for pointer down outside content | — |
| onFocusOutside# | (event: FocusOutsideEvent) => voidCallback for focus moving outside content | — |
| onInteractOutside# | (event: PointerDownOutsideEvent | FocusOutsideEvent) => voidCallback for any interaction outside content | — |
| className# | stringCSS class name | — |
| ref# | React.ForwardedRef<HTMLDivElement>Forward ref to content div | — |