Installation
npx shadcn@latest add @iconiq/r-popoverProps
Popover
Thin wrapper around `PopoverPrimitive.Root` that mirrors the resolved open state into local context so `PopoverContent` can infer presence automatically.
openbooleandefaultOpenbooleanonOpenChange(open: boolean) => voidchildrenReactNodeRequired
Wraps Radix Popover.Root and keeps the resolved open state in local context so PopoverContent can infer presence automatically.
Controlled and uncontrolled usage are both supported.
PopoverTrigger
Light wrapper around the Radix trigger with a larger default hit area when not using asChild.
asChildbooleanchildrenReactNodeRequired
PopoverTrigger is a light wrapper around the Radix trigger with a larger default hit area when not using asChild, while PopoverAnchor remains the Radix positioning anchor.
Both exports still accept the remaining interactive props for event handling and accessibility wiring.
PopoverAnchor
Radix positioning anchor used when the popover should attach to a non-trigger element.
asChildbooleanchildrenReactNodeRequired
PopoverAnchor still accepts the remaining primitive props for event handling and accessibility wiring.
PopoverContent
Animated content wrapper built on Radix Popover.Content and AnimatePresence.
openbooleanchildrenReactNodeRequired
classNamestringalign"start" | "center" | "end"Default center
sideOffsetnumberDefault 8
collisionPaddingnumber | Partial<Record<Side, number>>Default 12
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, reads the resolved placement for direction-aware motion, and uses the Radix transform-origin CSS variable so scaling stays anchored to the trigger.
The panel ships without drop shadow so the surface stays flat against the page.
Content size changes animate while the popover is open, so progressive disclosure and copy swaps do not snap abruptly.
Entry and exit animation are owned internally, so Motion-specific props such as initial, animate, exit, and transition are not part of the public prop surface.
Registry bundle
Install the exact registry entry shown on the right when you want the component file and its declared runtime dependencies together.
Dependencies: @radix-ui/react-popover, motion.
Uses the dedicated Radix Popover primitive for root, trigger, anchor, content, and portal ownership.
Preserves the same side-aware panel motion and size-aware content animation as the core popover.
The generated registry file is /r/r-popover.json.