# Shadcn In Dialog

> Signature in a dialog

- Type: example, free and open source (MIT)
- Component: [Signature Pad](https://reui.io/components/signature-pad.md)
- Page: https://reui.io/components/signature-pad/c-signature-pad-8
- Docs (Base UI): https://reui.io/docs/components/base/signature-pad.md
- Docs (Radix UI): https://reui.io/docs/components/radix/signature-pad.md
- MCP: `get_example("c-signature-pad-8")`
- Registry item: https://reui.io/r/styles/base-nova/c-signature-pad-8.json
- Uses: Button, Dialog, Item, Signature Pad

## Best for

Edits made on a draft copy so Cancel keeps the stored mark, shown afterwards as a small preview in the row footer

## Agent notes

- `signature` starts empty in local state; load the saved strokes from the user's profile and persist them on Save signature

## Install

```bash
npx shadcn@latest add @reui/c-signature-pad-8
```

## About Shadcn Signature Pad

### When to use

- Contracts, agreements and statements of work signed in place, down to initials per clause
- Required form fields, proof of delivery on a phone and a profile signature reused on documents
- Mouse, finger or stylus ink exported as PNG, JPEG, SVG or JSON, or uploaded as an image Blob

### When not to use

- A sign in or sign up page where people type an email and a password: use the [Auth blocks](https://reui.io/blocks/application/auth.md)
- A scanned or photographed mark the signer already has as an image: use [File Upload](https://reui.io/components/file-upload.md) (`get_component("file-upload")`)
- A whole data entry page of typed fields with nothing drawn by hand: use the [Form blocks](https://reui.io/blocks/application/form.md)

### Agent notes

- Image exports draw ink with no `color` of its own in black, on a transparent background except `jpeg`; pass `background` for paper white
- `readOnly` locks a signed pad at full ink strength while `disabled` dims it; both stop input and drop the area from the tab order
- With `name` set, keep `format` as `svg` or `json`; `png` and `jpeg` rasterize the hidden form field after every stroke

Every ReUI item has a twin like this one; the index is https://reui.io/llms.txt. Agents with the ReUI MCP (https://reui.io/docs/mcp) get the same guidance from the getters named above.
