# Prompt box — Detent

> A white card on a quiet tray, round keys, and one dark key that speaks or sends. While it answers, the tray slides out from under the card and says what it’s doing.

Canonical: https://detentui.com/components/prompt
Last updated: 2026-11-10

## About

A white card on a quiet tray, round keys, and one dark key that speaks or sends. While it answers, the tray slides out from under the card and says what it’s doing.

## Details

- A white card lifted on a soft shadow, sitting on a grey tray with the same corners. Keys are round and nest in the card’s corner; the one dark key is the only strong colour on it.
- It reserves a fixed footprint and grows upward as you write, by transform, so nothing beneath it moves. Drop or paste files anywhere on it.
- The modes sit in a capsule. The chosen one is lifted out of it and says its name, and the lift travels when you switch; arrow keys move it too. Model and project are small menus: tap one, or press and slide to a row and let go.
- Empty, with `onVoice`, the dark key shows a wave and speaks. Words turn it into Send, and Send into Stop while it answers. Send clears the box at once.
- While it answers, the tray says what it’s doing and for how long, in real seconds, and says so when it’s still waiting. With no `projects`, the tray slides out from under the card and the card rises; with them, it holds still and trades the project for the status.
- If a send fails your words come back, and the tray says so. Cmd+Z straight after a send brings them back too. A double click on Send never stops the answer it just started.
- Given suggestions, the focused, empty box offers the first, and Tab takes it. PromptStarters offers whole prompts as a quiet numbered list; press one, or its number.

## Keyboard shortcuts

| Keys | Action |
| --- | --- |
| Tab | Use the suggestion |
| ↵ | Send |
| ⇧ ↵ | New line |
| ⌘ Z | Bring back what you just sent |
| Esc | Stop the answer |

## Install

```bash
npx shadcn add https://detentui.com/r/prompt
```

## Related
- [All components](https://detentui.com/components)
- [Pro](https://detentui.com/pro)
