The library is still in early development. Breaking changes and bugs may occur without prior notice. Thanks for your interest in using the library!

Search

Dialog

Source

A modal dialog component for displaying content in an overlay.

Usage

Import the Dialog components from @bun-ui/react and use them in your project:

import {
  Dialog,
  DialogClose,
  DialogContent,
  DialogTitle,
  DialogTrigger,
} from "@bun-ui/react"
<Dialog>
  <DialogTrigger className="btn">Open Dialog</DialogTrigger>
  <DialogContent>
    <DialogTitle>Dialog Title</DialogTitle>
    <p>This is the content of the dialog.</p>
    <DialogClose className="btn">Close</DialogClose>
  </DialogContent>
</Dialog>

Examples

Form Dialog