Simulates prefers-reduced-motion for the demo. Off follows your system setting.
Steps focus through the demo with ] and [. Tab, arrows, and Escape stay native so the component behaves as shipped.
1
A panel that unfolds out of its trigger, for small forms and details.
npx shadcn@latest add ikislay/pixel-ui/popoverimport { Popover } from "@/components/ui/popover"export function Demo() {return (<Popover aria-label="Details" trigger={<button type="button">Details</button>}>Shipping takes four to six days.</Popover>)}
1// Loading…
Options you can pass to customize this component.
trigger*ReactElementOne focusable element that toggles the panel. It gets aria-expanded.
openbooleanControls the panel. Leave it unset to let the popover manage itself.
defaultOpenbooleanThe starting state when uncontrolled.
onOpenChange(open: boolean) => voidCalled whenever the panel opens or closes.
sidetopbottomWhich side of the trigger the panel opens on. It does not flip at the screen edge.
alignstartcenterendHow the panel lines up with the trigger.
onFeedback(event: "open" | "close") => voidCalled at each semantic moment, for wiring sound or haptics.
classNamestringMerged onto the panel.