mode | 'context' | 'fixed' | required | Positioning strategy: context follows an anchor element, fixed uses explicit x / y coordinates. |
anchor | Ref<HTMLElement | null> | — | External anchor element for context mode. Leave it out and bind the returned anchorRef to the trigger instead. |
placement | 'above' | 'below' | 'start' | 'end' | MaybeRefOrGetter | 'below' | Side of the anchor the layer is placed on. Logical: start / end mirror under RTL. Flips when there is no room. |
alignment | 'start' | 'center' | 'end' | MaybeRefOrGetter | 'center' | Alignment along the placement axis. |
gap | number | 4 | Clearance between the anchor and the layer, in pixels. |
x | number | MaybeRefOrGetter | 0 | Horizontal viewport coordinate for fixed mode. |
y | number | MaybeRefOrGetter | 0 | Vertical viewport coordinate for fixed mode. |
isDefaultOpen | boolean | false | Whether the layer is open on the first render. |
lightDismiss | boolean | MaybeRefOrGetter | false | Whether clicking outside dismisses the layer. |
lazyMount | boolean | MaybeRefOrGetter | false | Whether to wait for the first show() before rendering the content. isMounted reports the answer. |
onShow | () => void | — | Called when show() opens the layer. Opening through isDefaultOpen is not a show, so it does not fire. |
onHide | () => void | — | Called when hide() closes the layer. |