Primitive

Dialog

A modal window that interrupts the user with important content and expects a response.

Installation

npx benflux-ui add dialog

Usage

import {
  Dialog, DialogContent, DialogHeader,
  DialogTitle, DialogTrigger,
} from "@benflux-ui/react"

<Dialog>
  <DialogTrigger asChild>
    <Button>Open</Button>
  </DialogTrigger>
  <DialogContent>
    <DialogHeader>
      <DialogTitle>Title</DialogTitle>
    </DialogHeader>
    Content here
  </DialogContent>
</Dialog>

Props — DialogContent

PropTypeDefaultDescription
size"sm" | "default" | "lg" | "xl" | "full""default"Maximum width of the dialog
showClosebooleantrueShows the close button in the top-right corner