Open the popover to inspect the controlled open state, portal-based panel, and origin-aware spring animation.
Installation
npx shadcn@latest add @iconiq/popoverProps
Popover
4 props
Standard shadcn-style export: `Popover` is `PopoverPrimitive.Root`, matching what the CLI installs into `components/ui/popover`.
open
booleanControlled open state on the Radix root when you want React state to own visibility.
defaultOpen
booleanUncontrolled initial state forwarded to the underlying Radix popover root.
onOpenChange
(open: boolean) => voidCalled whenever Radix requests a state change through the trigger, outside interaction, or escape handling.
children
ReactNodeRequired
Composition surface for the trigger, optional anchor, and content primitives.
Notes
Any remaining root props continue to work because the export is the Radix primitive itself.
PopoverTrigger and PopoverAnchor
2 props
These exports are direct aliases of the matching Radix primitives and are used to open the popover or redefine its positioning anchor.
asChild
booleanLets you render your own button, link, or wrapper element without adding an extra DOM node.
children
ReactNodeRequired
Interactive or layout content rendered by the trigger or anchor primitive.
Notes
Because both exports come directly from Radix, they also accept the remaining primitive props for event handling and accessibility wiring.
PopoverContent
5 props
Animated content wrapper built on Radix Popover.Content and AnimatePresence.
open
booleanRequired
Controls whether the animated portal branch renders at all. In practice this must mirror the root open state for entry and exit motion to run correctly.
children
ReactNodeRequired
Content rendered inside the animated panel.
className
stringMerged onto the motion.div panel for local width, spacing, or surface overrides.
align
"start" | "center" | "end"Default
centerForwarded to Radix Popover.Content to control horizontal alignment relative to the trigger or anchor.
sideOffset
numberDefault
8Forwarded to Radix Popover.Content to control the gap between the anchor and the floating panel.
Notes
Remaining Radix content props are forwarded through to PopoverPrimitive.Content, including side, collisionPadding, onEscapeKeyDown, and accessibility props.
The component always renders inside a Radix portal and uses the Radix transform-origin CSS variable so the motion scales from the resolved placement.
Entry and exit animation are owned internally, so initial, animate, exit, and transition are not part of the public prop surface.