StacklyUI
Components/Dialog

Dialog

A modal window overlaid on the page.

01

Preview & playground

Edit the code — the preview updates live. Try changing props, text, or classes.

playground.tsx
render(
  <Dialog>
    <DialogTrigger asChild>
      <Button>Open dialog</Button>
    </DialogTrigger>
    <DialogContent>
      <DialogHeader>
        <DialogTitle>Delete project?</DialogTitle>
        <DialogDescription>This can't be undone. The project and its data will be permanently removed.</DialogDescription>
      </DialogHeader>
      <DialogFooter>
        <DialogClose asChild><Button variant="ghost">Cancel</Button></DialogClose>
        <DialogClose asChild><Button variant="destructive">Delete</Button></DialogClose>
      </DialogFooter>
    </DialogContent>
  </Dialog>
)
02

Installation

Copy the source into your project with the registry CLI:

$pnpm dlx shadcn@latest add @stacklyui/dialog

Or install the package and import it:

$pnpm add @stacklyui/ui motion
03

Usage

Import Dialog from "@stacklyui/ui" and compose it as shown in the playground above. Every interactive primitive is built on Radix, so keyboard navigation, focus management, and ARIA are handled for you.