Skip to content
caliper ui pro docs

Undo rewind

The bar that follows a destructive action: what happened, an Undo button and a ring that drains over the time you have left. Ctrl or Cmd Z undoes it too.

Pro
  • INV-0417

    Halden Analytics

    $4,280.00
  • INV-0415

    Lumen Labs

    $918.00
  • INV-0416

    Ostra Freight

    $12,960.50
  • INV-0414

    Northwind Studio

    $7,125.00

When to use

  • Deleting rows, moving items and bulk edits that you can safely delay.
  • Anywhere a confirm dialog would add friction to a common action.

When not to use

  • Actions that cannot be delayed or reversed; confirm those first with an alert dialog.
  • Several overlapping undos; offer one at a time.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/undo-rewind

Adds its 5 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

UndoRewind

6 props
PropTypeDefaultDescription
onUndo *(id: string | number) => void—
onExpire((id: string | number) => void)—
pending *UndoPending | null—The action that can be undone, or null when there is none. A new id restarts the countdown.
durationnumber6000How long Undo stays available, in milliseconds.
labelstring"Undo"
classNamestring—

Keyboard

  • No custom key handling; Tab and the native activation keys do the work.

Accessibility

It exposes status semantics, with aria-hidden kept in step with state. Changes that matter are announced through a live region.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/undo-rewind.md

The index of every part is at /llms.txt.

More in Workspace chrome