CheckoutFlow

A cursor-driven checkout card with a pricing toggle, card input, terms checkbox, and payment confirmation

0:00 / 0:10
0s2s4s6s8s10.7s
0:00 / 0:10

A composition scene rendered as a real checkout card. The card and its fields blur-in in sequence, then a cursor flips the billing toggle monthly → yearly, types the card number, ticks the terms checkbox, and presses Pay through loading to success — finishing with a success toast. A pure orchestrator: every animated channel comes from a composed primitive's transition hook.

Installation
$ pnpm dlx shadcn@latest add @remocn/checkout-flow

Composed primitives

  • Blur-in — staggered reveal of the card, header, and each field
  • Toggle-group — segmented control for plan selection
  • Input — card number reveal, then a static filled (blur) resting state
  • Checkbox — terms acceptance with a draw-on checkmark
  • Button — primary Pay action with hover/press/loading/success states
  • Field — labeled layout slots for the controls
  • Cursor — animated pointer with click ripples
  • Toast — payment confirmation message

Timeline narrative

The card surface fades in place (frames 0–18), then the header and each field blur-in staggered, all settling by frame 58. At frame 64 the cursor clicks the Yearly segment and the toggle thumb slides to it. At frame 96 the cursor focuses the card-number field, which types in from frame 100 to 140, then settles to its static filled state as the cursor leaves at 150 — the same frame the terms checkbox is clicked and ticks. At frame 180 the cursor presses Pay: hover → press → loading (186) → success (224). The success toast slides in at frame 224 and auto-dismisses at frame 286.

Props9

PropTypeDefault
title
string"Upgrade your plan"

Card title shown in the header.

description
string"Complete your purchase to unlock every feature."

Supporting line under the title.

plans
{value: string; label: string}[][{value:"monthly",label:"Monthly"},{value:"yearly",label:"Yearly"}]

Array of pricing plan options for the toggle-group. The first is the resting selection.

cardLabel
string"Card number"

Label rendered above the card-number input.

cardPlaceholder
string"4242 4242 4242 4242"

Card number value revealed by the typing input.

termsLabel
string"I accept the terms and conditions"

Text shown beside the terms checkbox.

payLabel
string"Pay $49"

Text displayed on the primary Pay button.

toastTitle
string"Payment successful"

Success message shown in the toast.

theme
RemocnTheme—

Optional theme override (concrete oklch/hex/rgb values).

  • titlestring

    Card title shown in the header.

    Default"Upgrade your plan"

  • descriptionstring

    Supporting line under the title.

    Default"Complete your purchase to unlock every feature."

  • plans{value: string; label: string}[]

    Array of pricing plan options for the toggle-group. The first is the resting selection.

    Default[{value:"monthly",label:"Monthly"},{value:"yearly",label:"Yearly"}]

  • cardLabelstring

    Label rendered above the card-number input.

    Default"Card number"

  • cardPlaceholderstring

    Card number value revealed by the typing input.

    Default"4242 4242 4242 4242"

  • termsLabelstring

    Text shown beside the terms checkbox.

    Default"I accept the terms and conditions"

  • payLabelstring

    Text displayed on the primary Pay button.

    Default"Pay $49"

  • toastTitlestring

    Success message shown in the toast.

    Default"Payment successful"

  • themeRemocnTheme

    Optional theme override (concrete oklch/hex/rgb values).