Popover
Non-modal content anchored to a trigger.
Non-modal content anchored to a trigger.
Backed by Base UI Popover for upstream behavior and configuration. Zenos owns the public API, styling, and composition shown on this page.
Anatomy
Section titled “Anatomy”Use Content for the common portal, positioning, collision, and popup composition. Header groups the accessible title and description; Footer provides responsive spacing for actions.
<Popover.Root> <Popover.Trigger render={<Button variant="primary" />}>Details</Popover.Trigger> <Popover.Content arrow> <Popover.Header> <Popover.Title>Workspace details</Popover.Title> <Popover.Description>Current access and ownership.</Popover.Description> </Popover.Header> <Popover.Footer> <Popover.Close>Done</Popover.Close> </Popover.Footer> </Popover.Content></Popover.Root>Import
Section titled “Import”import { Button, Popover } from "@zentara-co/zenos-ui";Popover uses open, defaultOpen, and onOpenChange. Content manages portal, positioner, and popup composition. Its default surface matches Dropdown Menu in both light and dark themes. Add the arrow prop when the popup needs a directional arrow; it is omitted by default. The popup and arrow share the same 150ms enter and exit motion so the arrow does not lag behind the surface. Escape and outside interaction close the popover according to Base UI behavior.
Controlled state
Section titled “Controlled state”Control open state when the trigger label or another part of the interface needs to reflect visibility.
Popover is closed.
Placement
Section titled “Placement”side is the preferred side and may flip when collision avoidance detects insufficient space. align positions the popup along the selected side.
Interactive content
Section titled “Interactive content”Popover is non-modal and works well for compact controls that need an anchored surface. Keep longer workflows in Dialog or a dedicated page.
Motion
Section titled “Motion”Popovers fade, scale, and move from their resolved side when opening, then reverse that movement when closing. Reduced-motion preferences remove the animation automatically. The arrow fades with the popup.
Open each popover. The first animates in and out. disableMotion makes the second appear and disappear immediately.
Custom styling
Section titled “Custom styling”Use className to customize the popup surface and arrowClassName to keep the arrow fill matched. Pair semantic surface, border, and foreground tokens so nested title, description, and action colors remain legible across color schemes.
Popover or another component
Section titled “Popover or another component”Use Popover for compact, interactive content anchored to a trigger. Use Tooltip for brief non-interactive descriptions, Dropdown Menu for a list of commands, and Dialog for modal or longer tasks.
Popover.Root Popover.Trigger Popover.Content Popover.Header Popover.Title Popover.Description Popover.Footer Popover.Close Popover.Arrow
API
| Prop | Type | Default | Description |
|---|---|---|---|
open | boolean | — | Controlled open state. |
defaultOpen | boolean | false | Initial uncontrolled state. |
onOpenChange | (open: boolean, eventDetails) => void | — | Runs when visibility changes. |
Trigger.render / Close.render | ReactElement | function | — | Composes Trigger or Close with another element. |
side | top | right | bottom | left | inline-* | bottom | Preferred popup side. |
align | start | center | end | center | Position relative to trigger. |
arrow | boolean | false | Renders the arrow inside Content. The arrow uses the same enter and exit motion as the popup. |
Content.disableMotion | boolean | false | Disables the popup and arrow enter and exit animation for this instance. |
sideOffset / alignOffset | number | sideOffset: 8 | Adjusts the popup distance and alignment-axis offset. |
Close.variant / Close.size | ButtonVariant / sm | md | lg | outline / sm | Styles Popover.Close when it renders its default button. |
Content.className / arrowClassName / positionerClassName | string | — | Customizes the popup, arrow, or positioning wrapper. |
Unless narrowed above, each DOM-rendering part also accepts its underlying native or Base UI props,
including className, style, aria-*, and data-*.
Accessibility
Section titled “Accessibility”Title and Description name and describe the popup through Base UI’s ARIA relationships. The trigger receives expanded-state semantics. Escape and allowed outside interaction dismiss the popup, and focus returns to the trigger. Keep the focus order logical, label every form control, and avoid putting essential information in an unlabeled popup.