Skip to content
Sign upPro
BillingCancel flowMenu

Cancel flow (Pro)

ProIncluded in $99

Cancelling without the maze: one optional reason, at most one fitting offer, and a confirmation that says what is kept and what goes.

ProOne optional question, at most one offer that fits it, and a confirmation that says what is kept and what goes.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/cancel-flow

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 { 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

ProNo offers configured, in a narrow frame: reason, then the confirmation with the lists stacked.

Props

PropTypeNotes
plan, endsAtstring, Date | stringWhat is being cancelled and when the paid period ends
reasonsCancelReason[]{ id, label, offer?, ask? }
keeps, losesstring[]What stays, and what goes away
pauseMonthsnumber[]Pause lengths; leave out to never offer a pause
downgrade{ plan, price }A cheaper plan to offer
onPause, onDowngrade, onCancelEach gets { reason, detail }; throw to show the error
onResume, onCloseUndo on the last screen; Keep my plan and Done
labelsPartial<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.