This page as markdown: /popover.md · Index for agents: /llms.txt · Everything in one file: /llms-full.txt

Popover

Status: stable

Click-triggered overlay over Base UI Popover (focus management, collision-aware positioning, Esc/outside dismissal). Holds interactive content; 18rem-wide surface.

Keywords: popover, floating panel, anchored, disclosure

Usage

Use Popover for anchored secondary content that needs more room than a tooltip but less commitment than a dialog.

Best practices

Anatomy

Part Required Description
PopoverTrigger yes The element that anchors and opens the popover.
PopoverContent yes The floating content surface.
PopoverTitle no An optional heading for the content.
PopoverDescription no Optional supporting copy.
PopoverClose no An explicit close control when helpful.
PopoverArrow no An optional arrow pointing to the trigger.

Subcomponents

Name Type Description
PopoverTrigger Base UI Trigger props + render The anchor element. Use render={
PopoverContent Base UI Popup props + side: "top" | "bottom" | "left" | "right" | "inline-*" + align: "start" | "center" | "end" + sideOffset: number + anchor: Element | Ref | (() => Element) | VirtualElement + className Portals + positions + paints the popup. side picks which side of the trigger to render against (auto-flips on collision; defaults to "bottom"); align sets alignment along that side (defaults to "center"); sideOffset is the gap in px (defaults to 8). anchor positions against a different element/ref/getter than the trigger — Base UI 1.5 has no separate Anchor part, so pass it here to decouple the open-location from the trigger.
PopoverTitle Base UI Title props + className Accessible heading; Base UI wires aria-labelledby to the popup.
PopoverDescription Base UI Description props + className Supplementary copy; Base UI wires aria-describedby to the popup.
PopoverClose Base UI Close props + render A button that closes the popover. Use render={
PopoverArrow Base UI Arrow props + className Optional pointer connecting the popup to its trigger. Place inside PopoverContent.

Props

Name Type Default Description
Popover (Root) Base UI Popover.Root props (open, defaultOpen, onOpenChange, modal) — Groups the trigger and content. Uncontrolled by default.

Tokens used

popover, popover-foreground, border-floating, muted-foreground

Accessibility

Related

Examples

Basic

import { Button, Popover, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger } from "@sableui/react"

<Popover><PopoverTrigger render={<Button variant="secondary">Details</Button>} /><PopoverContent><PopoverTitle>Plan details</PopoverTitle><PopoverDescription>Up to 10 seats, billed monthly per seat.</PopoverDescription></PopoverContent></Popover>

With close

import { Button, Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger } from "@sableui/react"

<Popover><PopoverTrigger render={<Button variant="secondary">Open</Button>} /><PopoverContent><PopoverTitle>Heads up</PopoverTitle><PopoverDescription>Upgrading starts a new billing period today.</PopoverDescription><PopoverClose render={<Button size="sm">Got it</Button>} /></PopoverContent></Popover>