
- Location:
sabo/src/components/ui/popover.tsx
When to use
- Provide small forms, menus, or tips anchored to a button or icon.
- Use when a full dialog is too heavy and a tooltip is too limited.
Usage
Key props
Positioning relative to the trigger: start | center | end.
Offset from the trigger in pixels.
PopoverAnchor
Position the popover relative to a specific anchor element instead of the trigger.
This component forwards all props from Radix Popover primitives (Root/Trigger/Content). Above are commonly used props. For the full API, see Radix docs: https://www.radix-ui.com/primitives/docs/components/popover
Styling tip
Constrain width withw-64 and keep content concise for a lightweight feel.
Accessibility
- Use
PopoverTriggerwith a descriptive button; ensure keyboard navigation works. - Content should be dismissible via Esc or click outside.