Skip to content
caliper ui pro docs

Cancellation flow

A short flow that asks why, offers alternatives and confirms a cancellation.

Pro
Why are you leaving?

One answer helps us improve. It does not change what happens next.

When to use

  • Letting customers cancel without contacting support.
  • You want to offer a pause or a lower plan first.

When not to use

  • You need to remove data immediately; confirm separately.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/cancellation-flow

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

CancellationFlow

8 props
PropTypeDefaultDescription
planName *string—
endsOn *string—When access ends, as text.
reasons *readonly CancelReason[]—
consequences *readonly string[]—What the customer loses or keeps.
onOffer((offerId: string, reason: string) => void)—
onCancel *(reason: string, details: string) => void | Promise<void>—
onUndo(() => void)—
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/cancellation-flow.md

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

More in Billing