# Rewind — Detent

> A textarea you can rewind. Hold undo and drag, and your writing runs back under your hand, with the words you deleted coming back in colour.

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

## About

A textarea you can rewind. Hold undo and drag, and your writing runs back under your hand, with the words you deleted coming back in colour.

## Details

- A tap of ⌘Z steps back one thought, not one letter. Holding it turns the mouse and the wheel into a scrubber.
- Every pause you made is a soft notch, so it stops where your thinking stopped.
- At Now it’s a plain textarea, so typing costs nothing and selection, spellcheck and IME are the browser’s own.
- Store `onHistory` and pass it back as `history`, and undo survives a reload.
- Plain text only.

## Keyboard shortcuts

| Keys | Action |
| --- | --- |
| ⌘Z | Back one thought. Hold to scrub |
| ⇧⌘Z | Forward one thought |
| Esc | Put it back while scrubbing |

## Install

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

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