Popover
Floating content anchored to a trigger.
Usage
import {
Popover,
PopoverContent,
PopoverTrigger,
} from '@epilot/spark-ui/popover'<Popover>
<PopoverTrigger render={<Button>Open popover</Button>} />
<PopoverContent>{/* content */}</PopoverContent>
</Popover>API Reference
This component is built on top of Base UI Popover. See the Base UI documentation for the full API reference.
Components
Popover: Root state container.PopoverTrigger: Element that toggles the popover.PopoverContent: Floating panel; supportsalign,sideOffset, andcontainer(mount the popup into a different document/element thandocument.body— an embedded preview iframe, say).PopoverClose: Closes the popover. Rendering a close part inside the popup is also what enables Base UI's focus trap when the popover ismodal.