overlayspopover
Popover
Click-triggered floating content panel anchored to a trigger element.
Import#
Slot Structure#
Wrapper trigger with a floating content portal containing the body.
Examples#
Placements#
Click trigger with four placement variants.
Hover Mode#
Hover-based popover using open and close delays.
Dismiss Control#
Prevent closing on outside interaction and Escape key.
API Reference#
Attributes#
Slot
trigger3 attributesElement users activate to open the popover.
ARIA Attributes
| ARIA Attribute | Description |
|---|---|
| aria-controls | References the controlled element while the related content is mounted. |
| aria-describedby | References descriptive text associated with the control. |
| aria-expanded | Indicates whether the controlled content is expanded. |
Props#
| Prop | Type | Default | Description |
|---|---|---|---|
| children | JSX.Element | — | The reference element that triggers the popover. |
| class | ClassValue | — | Class applied to the component root or trigger element. |
| classes | PopoverT.Classes | undefined | — | — |
| closeDelay | number | undefined | 100 | Delay in milliseconds before closing in hover mode. |
| content | JSX.Element | — | Content to render inside the popover body. |
| defaultOpen | boolean | undefined | — | — |
| dismissible | boolean | undefined | — | — |
| forceMount | boolean | undefined | — | — |
| id | string | undefined | — | — |
| modal | boolean | undefined | — | — |
| mode | PopoverMode | undefined | click | Interaction mode for triggering the popover. |
| onClosePrevent | (() => void) | undefined | — | — |
| onOpenChange | ((open: boolean) => void) | undefined | — | — |
| open | boolean | undefined | — | — |
| openDelay | number | undefined | 100 | Delay in milliseconds before opening in hover mode. |
| placement | Placement | undefined | — | — |
| preventScroll | boolean | undefined | — | — |
| ref | JSX.HTMLElementTags["span"] extends { ref?: infer Ref; } ? Ref : never | undefined | — | — |
| side | "bottom" | "top" | "right" | "left" | undefined | — | — |
| style | JSX.CSSProperties | undefined | — | — |
| styles | PopoverT.Styles | undefined | — | — |