Skip to content
caliper ui pro docs

Revision stack

A document's revisions as a pile of sheets, newest on top. Choose two and they stand up facing each other, turned only 16 degrees so the text keeps its shape, with removed words struck through and added words underlined.

Pro
Choose two revisions.
State

When to use

  • Policies, contracts and docs where people need to see exactly what changed.
  • Version history that should show the change, not only the date.

When not to use

  • Code; use the file diff, which has line numbers and hunks.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/revision-stack

Adds its 6 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

RevisionStack

8 props
PropTypeDefaultDescription
labelstring"Revisions"
revisions *readonly Revision[]—
onCompare((olderId: string, newerId: string) => void)—Called with the older and the newer revision id when a comparison opens.
statusDepthStatus"ready"
messagesDepthMessages—
onRetry(() => void)—
disabledboolean—
classNamestring—

Keyboard

Escape
Closes or cancels, then returns focus to where it came from.

Accessibility

It is built on native elements and keeps aria-hidden, aria-label and aria-live 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/revision-stack.md

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

More in Audit, logs & inbox