# Dialog

Modal interruptions built on the native <dialog>: a task, a confirmation, a full-screen reader.

Pattern: `dialog.*` (this page) · Component: [`<Dialog>`](https://www.prongs.dev/docs/components/dialog.md) · Intents: [5](#intents)

## Intents

| Intent | Status | Use it for |
|---|---|---|
| [`dialog.task`](https://www.prongs.dev/docs/intents/dialog/task.md) | `<dialog>` | A focused task that blocks the page until done or dismissed: edit settings, compose |
| [`dialog.confirm`](https://www.prongs.dev/docs/intents/dialog/confirm.md) | `<dialog>` | Asks the user to confirm or cancel one decision |
| [`dialog.media`](https://www.prongs.dev/docs/intents/dialog/media.md) | `<dialog>` | Shows one photo or video large over the dimmed page, with its details beside it: who posted it, the caption, comments. A click outside closes it. On small screens it fills the screen, the photo between its title and its details |
| [`dialog.reader`](https://www.prongs.dev/docs/intents/dialog/reader.md) | `<dialog>` | Shows one piece of content over the whole screen: reading an article |
| [`dialog.drawer`](https://www.prongs.dev/docs/intents/dialog/drawer.md) | `<dialog>` | A full-height panel that slides in from the side over the dimmed page: site navigation on a small screen. A click outside closes it |

## Choosing a domain

Find the row that describes your case, and use the domain on the right.

| If the problem is | Use |
|---|---|
| Titles that give a page its structure, from the marketing headline down to the title of one item. | [`heading.*`](https://www.prongs.dev/docs/intents/heading.md) |
| Running text and the small pieces around it: introductions, captions, labels, facts about an item, code. | [`text.*`](https://www.prongs.dev/docs/intents/text.md) |
| Messages about what just happened or is happening. They are announced to screen readers. | [`feedback.*`](https://www.prongs.dev/docs/intents/feedback.md) |
| Commands, named for what they do: save, delete, share. With an href they render a link, without one a button. | [`action.*`](https://www.prongs.dev/docs/intents/action.md) |
| Moving around: the home link, pages of the site, views of the same content, steps of a flow. | [`nav.*`](https://www.prongs.dev/docs/intents/nav.md) |
| Picking from a small set shown all at once: options for a setting, filters, colours. | [`choice.*`](https://www.prongs.dev/docs/intents/choice.md) |
| What the user types or picks in a form. The intent sets the element, the input type, the input mode and autocomplete. | [`field.*`](https://www.prongs.dev/docs/intents/field.md) |
| Page regions and groups. The intent picks the element (main, section, form, ul…) and the arrangement. | [`layout.*`](https://www.prongs.dev/docs/intents/layout.md) |
| Images that identify a person or illustrate content, with a text fallback when there is no image. | [`media.*`](https://www.prongs.dev/docs/intents/media.md) |
| Modal interruptions built on the native <dialog>: a task, a confirmation, a full-screen reader. | `dialog.*` (this page) |
| Things that open next to the button that opened them without blocking the page: menus, pickers, extra detail. | [`popover.*`](https://www.prongs.dev/docs/intents/popover.md) |

## For registry authors

**Starter intents.** These are the intents `prongs add` puts in your registry, shown in this site’s theme. Yours are your own `registry.ts`: rename, restyle and add to them, and see them with `prongs add gallery`.
