# Rewrite — Detent

> Select a phrase, say how it should read, and watch it rewritten in place like a tracked change. Tab takes it.

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

## About

Select a phrase, say how it should read, and watch it rewritten in place like a tracked change. Tab takes it.

## Details

- A bar docks under the selection, never on the words you are deciding about: say what you want in your own words, or take a quick ask.
- While the assistant works the bar wears the Intelligence edge, loud the first time and quiet after, and the chosen words shimmer in place.
- Its version streams in after the original, which is struck through, so you read the change before you take it.
- The bar says how much the change moved, in words, so a rewrite that grew when you asked for shorter is obvious at a glance.
- Tab accepts: the old words fold away and the new ones settle in with one sweep of green. Escape puts everything back, even mid-way.
- Try again asks for another version of the same request without losing your selection.

## Keyboard shortcuts

| Keys | Action |
| --- | --- |
| Enter | Send your ask |
| Tab | Accept the suggestion |
| Esc | Stop, or undo it |

## Install

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

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