Skip to content
caliper ui pro docs

TL;DR toggle

A long text with a switch between the full article and an AI summary. The height glides between the two, points arrive in sequence, and each point names its source paragraph: choosing it opens the full text there and marks it.

Pro

Incident review: EU checkout errors

Platform team, 3 December1 min read

On Tuesday at 14:02 UTC, checkout requests in the EU region began failing for a subset of customers. The failure rate climbed to 18% over the next nine minutes before automatic alerts paged the on-call engineer, who confirmed the impact at 14:13.

The cause was a configuration change to the payment service's connection pool, deployed at 13:58. The new limit was correct for the US region but too low for EU traffic at its afternoon peak, so requests queued until they timed out.

We rolled the change back at 14:21. Error rates returned to normal within two minutes, and every failed checkout was retried successfully by 15:05. No payment was charged twice and no order data was lost.

Two things let this reach customers. The change was tested against US load only, and the rollout went to every region at once instead of one region at a time, as our process requires for payment services.

We have added EU peak load to the pre-deploy test, made the staged rollout a hard requirement in the deploy tool rather than a written rule, and lowered the alert threshold so a rise like this pages within two minutes.

When to use

  • Long reads in a help centre, changelog, report or internal wiki.
  • Meeting notes or threads where most readers want the outcome first.

When not to use

  • Text short enough to read in a minute; the switch costs more than it saves.
  • Legal or contractual text, where a summary can be mistaken for the terms.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/tldr-toggle

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

TldrToggle

9 props
PropTypeDefaultDescription
titleReactNode—
metaReactNode—A line under the title, such as the author and date.
paragraphs *readonly string[]—
points *readonly TldrPoint[]—
modeTldrMode—
defaultModeTldrMode"full"
onModeChange((mode: TldrMode) => void)—
summarizingbooleanfalseWhile true the summary shows placeholders, for a host that writes it on demand.
classNamestring—

Keyboard

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

Accessibility

It exposes status semantics, with aria-busy, aria-hidden and aria-label 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/tldr-toggle.md

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

More in Assistant screens