# Dialog with Two Buttons

> A dialog with two buttons block.

A shadcn/ui block from the [@blocks-so](https://blocks.so) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/blocks-so/dialog-04).

- Page, with a live preview: https://shadcn.exchange/r/blocks-so/dialog-04
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/blocks-so/dialog-04-light-6bae7e67a7efa631.png
- Registry item: https://blocks.so/r/dialog-04.json
- Categories: dialogs
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://blocks.so/r/dialog-04.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `button`, `dialog`, `input`, `label`

## Files

### `content/components/dialogs/dialog-04.tsx`

```tsx
'use client';

import { Button } from '@/components/ui/button';
import {
  Dialog,
  DialogContent,
  DialogDescription,
  DialogFooter,
  DialogHeader,
  DialogTitle,
  DialogTrigger,
} from '@/components/ui/dialog';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';

export default function Dialog03() {
  return (
    <Dialog defaultOpen>
      <div className="flex items-center justify-center py-36">
        <DialogTrigger render={<Button />}>Edit Profile</DialogTrigger>
      </div>

      <DialogContent className="sm:max-w-md">
        <DialogHeader>
          <DialogTitle>Edit Profile</DialogTitle>
          <DialogDescription>
            Make changes to your profile here. Click save when you&apos;re done.
          </DialogDescription>
        </DialogHeader>
        <div className="space-y-2">
          <Label className="font-medium text-sm" htmlFor="username">
            Username
          </Label>
          <Input
            id="username"
            name="username"
            placeholder="Your username"
            type="text"
          />
        </div>
        <DialogFooter>
          <Button className="w-full" type="submit">
            Save Changes
          </Button>
        </DialogFooter>
      </DialogContent>
    </Dialog>
  );
}
```
