# Shadcn Keyboard Shortcuts

> Dialog with keyboard shortcuts list

- Type: example, free and open source (MIT)
- Component: [Dialog](https://reui.io/components/dialog.md)
- Page: https://reui.io/components/dialog/c-dialog-9
- Docs (Base UI): https://ui.shadcn.com/docs/components/base/dialog.md
- Docs (Radix UI): https://ui.shadcn.com/docs/components/radix/dialog.md
- MCP: `get_example("c-dialog-9")`
- Registry item: https://reui.io/r/styles/base-nova/c-dialog-9.json
- Uses: Button, Dialog, Kbd

## Best for

A read only shortcut reference split into 2 columns of key chords in a wider modal

## Agent notes

- Replace `shortcuts` with your bindings; it hardcodes the Mac Command symbol and nothing listens for these keys

## When not to use

- A searchable list of actions the user can run from the keyboard: use [Command](https://reui.io/components/command.md) (`get_component("command")`)

## Install

```bash
npx shadcn@latest add @reui/c-dialog-9
```

## About Shadcn Dialog

### When to use

- Short forms and settings that need an answer before the page continues
- Long text such as terms, read in a scrolling body that can grow to nearly full screen
- Reference overlays and notices, such as a keyboard shortcuts list or a session timeout

### When not to use

- A yes or no confirmation before a destructive action: use [Alert Dialog](https://reui.io/components/alert-dialog.md) (`get_component("alert-dialog")`)
- Long forms or record details that slide in from the screen edge: use [Sheet](https://reui.io/components/sheet.md) (`get_component("sheet")`)
- Mobile panels that open from the bottom and close with a swipe: use [Drawer](https://reui.io/components/drawer.md) (`get_component("drawer")`)

### Agent notes

- Compose the trigger through `render` on the base twin and `asChild` on the radix twin; the other one is silently ignored
- `DialogContent` renders its own close button; pass `showCloseButton` as false to drop it

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.
