Cancel flow (Pro)
ProIncluded in $99Cancelling without the maze: one optional reason, at most one fitting offer, and a confirmation that says what is kept and what goes.
On this page
Installation
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
import { CancelFlow } from "@/components/ui/chatcn/pro/cancel-flow"
<CancelFlow
plan="Pro"
endsAt={subscription.periodEnd}
reasons={[
{ id: "price", label: "It costs too much", offer: "downgrade" },
{ id: "usage", label: "I am not using it enough", offer: "pause" },
{ id: "feature", label: "It is missing something I need", ask: "What is missing?" },
]}
keeps={["Every chat and file", "Projects, read only"]}
loses={["Claude Opus 5.5", "Five times the messages"]}
pauseMonths={[1, 2, 3]}
downgrade={{ plan: "Plus", price: "$8 a month" }}
onPause={(months, { reason }) => pause(months)}
onDowngrade={() => switchPlan("plus")}
onCancel={({ reason, detail }) => cancelAtPeriodEnd(reason, detail)}
onResume={resume}
onClose={close}
/>Three short steps at most. The reason is optional, and some reasons ask for one line of detail. A reason can carry one offer: a pause for people who are not using it (it starts when the paid period ends and says the date it resumes), or a cheaper plan for people for whom it costs too much. Offers only appear when you configure them, and Continue to cancel sits beside the offer as a real button. The confirmation states the end date, says nothing more will be charged, and lists what is kept and what goes away side by side. The last screen can undo. Cancelling is at the end of the period; nothing is cut off early.
Examples
States
Props
| Prop | Type | Notes |
|---|---|---|
plan, endsAt | string, Date | string | What is being cancelled and when the paid period ends |
reasons | CancelReason[] | { id, label, offer?, ask? } |
keeps, loses | string[] | What stays, and what goes away |
pauseMonths | number[] | Pause lengths; leave out to never offer a pause |
downgrade | { plan, price } | A cheaper plan to offer |
onPause, onDowngrade, onCancel | Each gets { reason, detail }; throw to show the error | |
onResume, onClose | Undo on the last screen; Keep my plan and Done | |
labels | Partial<CancelFlowLabels> | Every string, for translation |
Accessibility
- Reasons and pause lengths are native radio groups.
- Each step moves focus to its heading.
- The final screen is a status message; a failure is an alert.
Motion
Each step rises in over 200 ms. Nothing moves under reduced motion.