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 modal window that unfolds out of the button that opened it.
npx shadcn@latest add ikislay/pixel-ui/dialogimport { Dialog } from "@/components/ui/dialog"export function Demo() {return (<Dialogtitle="Invite people"description="They will get an email with a link."trigger={<button type="button">Invite</button>}><input type="email" placeholder="[email protected]" aria-label="Email" /></Dialog>)}
1// Loading…
Options you can pass to customize this component.
title*ReactNodeThe heading. It also names the dialog for screen readers.
descriptionReactNodeA line under the title, read out when the dialog opens.
triggerReactElementAn element that opens the dialog. Leave it out when you control open yourself.
openbooleanControls the dialog. Leave it unset to let the dialog manage itself.
defaultOpenbooleanThe starting state when uncontrolled.
onOpenChange(open: boolean) => voidCalled whenever the dialog opens or closes.
onFeedback(event: "open" | "close") => voidCalled at each semantic moment, for wiring sound or haptics.
classNamestringMerged onto the window.