Skip to content
Browse library
BIU UI/Components/Dialog
COMPONENTS

Dialog

Explore the Dialog component and try its interactive examples.

INTERACTIVE PREVIEW

Preview

Install the components for this example with pnpm dlx shadcn add @biudev/dialog @biudev/button @biudev/checkbox.

Loading preview…
GET STARTED

Installation

Install the component source via shadcn Registry, the BIU CLI, or as an npm package.

TERMINAL / pnpm
pnpm dlx shadcn add @biudev/dialog

First time using @biudev? Map "@biudev": "https://ui.biu.dev/r/0.1.0/{name}.json" under registries in your components.json (see setup).

Usage

Start with this example, then adjust the import path for your project.

Install the components for this example with pnpm dlx shadcn add @biudev/dialog @biudev/button.

EXAMPLE / TSX
import { Button } from "@/components/ui/biu/button";
import { Dialog } from "@/components/ui/biu/dialog";

export function Example() {
  return (
    <Dialog
      trigger={<Button>View details</Button>}
      title="Project details"
      description="Information about this project."
    >
      <p>Your project is up to date.</p>
    </Dialog>
  );
}

Examples

Try each example or switch to its code.

API reference

Properties and defaults from the component source. An asterisk marks a required property; a dash means no explicit default.

DialogProps

AlertDialogProps

Also accepts properties from Pick<DialogProps,'trigger'|'title'|'description'|'children'|'open'|'defaultOpen'|'onOpenChange'|'contained'|'size'|'className'|'style'>.

Source

Review a formatted version of the component source used by the Registry.