forceMount | true | none | Used to force mounting when more control is needed. Useful when
controlling animation with React animation libraries. |
asChild | boolean | none | as child configuration. |
defaultChecked | boolean | none | default checked configuration. |
defaultValue | string | number | readonly string[] | none | Initial value for an uncontrolled component. |
autoFocus | boolean | none | auto focus configuration. |
className | string | none | Additional CSS classes. |
id | string | none | id configuration. |
style | CSSProperties | none | Inline style overrides. |
aria-invalid | boolean | "false" | "true" | "grammar" | "spelling" | none | Indicates the entered value does not conform to the format expected by the application. |
aria-label | string | none | Defines a string value that labels the current element. |
children | ReactNode | none | Content rendered inside the component. |
onFocus | FocusEventHandler<HTMLDivElement> | none | on focus configuration. |
onBlur | FocusEventHandler<HTMLDivElement> | none | on blur configuration. |
onChange | ChangeEventHandler<HTMLDivElement, Element> | none | Called when the input value changes. |
onSubmit | SubmitEventHandler<HTMLDivElement> | none | Called when the form is submitted. |
onKeyDown | KeyboardEventHandler<HTMLDivElement> | none | on key down configuration. |
onClick | MouseEventHandler<HTMLDivElement> | none | Called when the control is activated. |
onSelect | ReactEventHandler<HTMLDivElement> | none | on select configuration. |
side | "top" | "bottom" | "left" | "right" | none | side configuration. |
sideOffset | number | 8 | side offset configuration. |
onOpenAutoFocus | ((event: Event) => void) | none | Event handler called when auto-focusing on open.
Can be prevented. |
align | "center" | "end" | "start" | none | align configuration. |
alignOffset | number | none | align offset configuration. |
arrowPadding | number | none | arrow padding configuration. |
avoidCollisions | boolean | none | avoid collisions configuration. |
collisionBoundary | Boundary | Boundary[] | none | collision boundary configuration. |
collisionPadding | number | Partial<Record<"top" | "bottom" | "left" | "right", number>> | none | collision padding configuration. |
sticky | Sticky | none | sticky configuration. |
hideWhenDetached | boolean | none | hide when detached configuration. |
updatePositionStrategy | UpdatePositionStrategy | none | update position strategy configuration. |
onCloseAutoFocus | ((event: Event) => void) | none | Event handler called when auto-focusing on close.
Can be prevented. |
onEscapeKeyDown | ((event: KeyboardEvent) => void) | none | Event handler called when the escape key is down.
Can be prevented. |
onPointerDownOutside | ((event: PointerDownOutsideEvent) => void) | none | Event handler called when the a `pointerdown` event happens outside of the `DismissableLayer`.
Can be prevented. |
onFocusOutside | ((event: FocusOutsideEvent) => void) | none | Event handler called when the focus moves outside of the `DismissableLayer`.
Can be prevented. |
onInteractOutside | ((event: PointerDownOutsideEvent | FocusOutsideEvent) => void) | none | Event handler called when an interaction happens outside the `DismissableLayer`.
Specifically, when a `pointerdown` event happens outside or focus moves outside of it.
Can be prevented. |
deferPointerDownOutside | boolean | none | When `true`, a `'pointerdown'` event outside of the layered element will
wait for the interaction's click event before dispatching, allowing
third-party code to stop propagation of later events and cancel dismissal. |