Skip to content
Sign upGet access
MicrointeractionsRewindMenu

Rewind (Pro)

ProIncluded in $99

Back to a checkpoint as time running backwards: later messages leave newest first.

ProRestore a checkpoint and the messages after it leave newest first, faster and faster, while the checkpoint's clock turns back.

Press Restore on a checkpoint and the messages after it leave in reverse order, the newest first: each folds up and lifts away, the ones above follow faster and faster, and the checkpoint's clock turns back while it happens. Then the thread is exactly as it was.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/rewind

Needs chatcn Pro

This command works with a Pro license, along with every Pro component.

Or start free: sign up and get three Pro components on us, with a new one every month.

Usage

tsx
import { Rewind } from "@/components/ui/chatcn/pro/rewind"

<Rewind messages={thread} rewindTo={target} onRestore={setTarget} onRewound={(id) => trimAfter(id)} />

Props

PropTypeNotes
messages{ id, role, text, checkpoint? }[]A checkpoint label marks a restore point
rewindTostring | nullPlays the rewind after this id
onRestore(id) => voidShows Restore on checkpoints
onRewound(id) => voidRemove the later messages here

Accessibility

  • Restore buttons are labelled; the removed messages leave the tree once the rewind has played.

Motion

  • Each message folds 280 ms; the gap between them shrinks from 170 to 60 ms. Reduced motion: they go at once.