Billing Setup with Cycle Toggle

Step 3 of 4

Billing

Set up billing

Choose your billing cycle and payment method. You can change these anytime.

Billing cycle

Payment method

Have a coupon?

About this block

Billing Setup with Cycle TogglePRO

Onboarding screen for choosing a billing cycle (monthly/yearly) with savings badge, payment method selection, and optional coupon code input. Perfect for SaaS apps that collect payment during onboarding.

Onboarding28: Billing Setup with Cycle Toggle

Billing-step screen combining monthly/yearly cycle cards (the yearly option carrying a savings badge and pre-selected by default), a payment-method list, and a coupon field.

Upgrade to Pro

Pro blocks install through the shadcn CLI with your license key and ship their full source. Docs and live previews stay open to everyone, so you can read every block's details first.

Upgrade Now

Installation

Swap YOUR_EMAIL and YOUR_KEY for the email and license key on your account. Find your license key on your account page.

Radix flavor

bash
npx shadcn add "https://ui.beste.co/r/onboarding28?email=YOUR_EMAIL&license_key=YOUR_KEY"

Base UI flavor

bash
npx shadcn add "https://ui.beste.co/r-base/onboarding28?email=YOUR_EMAIL&license_key=YOUR_KEY"

This installs the block to components/beste/block/onboarding28.tsx and the badge, button, and input shadcn/ui primitives it depends on.

Quick start

The installed file exports onboarding28Demo alongside the block: the exact props behind the preview above. Spread it to get a working billing step in one line.

tsx
import { Onboarding28, onboarding28Demo } from "@/components/beste/block/onboarding28";

export default function OnboardingPage() {
  return <Onboarding28 {...onboarding28Demo} />;
}

Then replace the demo with your own props. Written out, a trimmed setup looks like this:

tsx
import { CreditCard, Landmark } from "lucide-react";
import { Onboarding28 } from "@/components/beste/block/onboarding28";

export default function OnboardingPage() {
  return (
    <Onboarding28
      badge={{ label: "Billing", variant: "secondary" }}
      heading="Set up billing"
      description="Choose your billing cycle and payment method."
      cycles={[
        { id: "monthly", label: "Monthly", price: "$19", period: "/month" },
        { id: "yearly", label: "Yearly", price: "$15", period: "/month", savingsBadge: "Save 20%" },
      ]}
      methods={[
        { id: "card", icon: <CreditCard className="size-5" />, label: "Credit Card" },
        { id: "bank", icon: <Landmark className="size-5" />, label: "Bank Transfer" },
      ]}
      primaryButton={{ label: "Start Subscription", href: "/setup/next" }}
      secondaryButton={{ label: "Start free trial", href: "/dashboard" }}
    />
  );
}

Props

PropTypeDefaultDescription
badge{ label: string; variant?: "default" | "secondary" | "outline" }Small badge above the heading
headingstringMain headline
descriptionstringSupporting copy below the heading
cyclesBillingCycle[][]Billing cycle cards
methodsPaymentMethod[][]Payment method rows
primaryButton{ label: string; href: string }Primary CTA link, always enabled
secondaryButton{ label: string; href: string }Secondary CTA link, always enabled
labels{ stepOf?: string; cycleTitle?: string; methodTitle?: string; couponTitle?: string; couponPlaceholder?: string; couponButton?: string }Group headings, step template, and coupon copy
currentStepnumber1Current step number, used only to fill the step-of label
totalStepsnumber4Total step count, used only to fill the step-of label
classNamestringExtra classes for the outer <section>
ts
type BillingCycle = {
  id: string;
  label: string;
  price: string;
  period: string;
  savingsBadge?: string;
};

type PaymentMethod = { id: string; icon: React.ReactNode; label: string };

Behavior notes

  • selectedCycle initializes to whichever cycle object has a savingsBadge set, falling back to cycles[0] if none does, so the discounted plan is pre-selected on load rather than always defaulting to the first array entry.
  • selectedMethod initializes to methods[0].id; both selectors are plain useState with no prop to seed a different starting choice.
  • The coupon Input and its "Apply" button are decorative: the input isn't bound to any state and the "Apply" button has no onClick handler, so entering and "applying" a code has no effect.
  • Unlike onboarding26/onboarding27, primaryButton here is never disabled: it renders as a normal <Link> regardless of the current cycle/method selection (both always resolve to a default anyway).
  • currentStep/totalSteps only drive the static "Step of " label above the card; there is no internal step progression.

Wiring the form up

This block ships the form markup only; state, validation, and submit are yours to add. Our guide wires the shadcn Field primitives to React Hook Form, TanStack Form, and Formisch on one field system.

More Onboarding blocks

View all Onboarding
PRO

onboarding18

Notification Preferences

Onboarding screen with toggle switches for configuring notification channels and frequency. Perfect for apps that need granular notification consent during setup.

PRO

onboarding27

Attribution Survey

Onboarding screen with a quick survey asking how the user discovered the product, with selectable options and an optional text input. Perfect for marketing attribution during signup.

PRO

onboarding23

Security Setup

Onboarding screen for configuring account security including two-factor authentication, recovery email, and backup codes. Perfect for apps that prioritize security during onboarding.

PRO

onboarding29

Company Info Form

Onboarding screen for collecting company information including name, team size selector chips, and industry dropdown. Perfect for B2B SaaS apps that need organizational context during setup.

PRO

onboarding22

Plan Overview with Usage Limits

Onboarding screen showing current plan details with visual usage bars for storage, seats, and API calls. Perfect for SaaS post-signup flows that introduce plan limits and upgrade paths.

PRO

onboarding30

Feature Tour Carousel

Onboarding screen with navigable feature highlight cards, dot indicators, and back/next buttons. Perfect for introducing key platform features during the first-time user experience.