MONTHLY · a switch whose square knob stretches across · YEARLY · a tag that swaps SAVE for SAVING; with PlanPrice, which rolls a plan's price and slides in the struck monthly price.
pnpm dlx shadcn@latest add @beautiful-ui-pro/billing-toggleNeeds your registry key. Your components.json style picks the Base UI or Radix build: radix-*, new-york and default get Radix, base-* gets Base UI.
The CLI adds the styles to the CSS file named in components.json (tailwind.css). Check that it points at your global stylesheet, that the project uses Tailwind CSS v4, and that the file is imported in your root layout. Installed by hand: paste styles.css into that file.
Import it and pass your content. The props that matter most are listed next.
"use client";
import * as React from "react";
import { BillingToggle, PlanPrice, type BillingPeriod } from "@/components/ui/notchset/billing-toggle";
export function TeamPlanPrice() {
const [period, setPeriod] = React.useState<BillingPeriod>("yearly");
return (
<div className="grid gap-4">
<BillingToggle value={period} onValueChange={setPeriod} />
<PlanPrice monthly={99} yearly={79} period={period} />
</div>
);
}value / onValueChange–
"monthly" | "yearly"Controlled.
labels–
{ monthly, yearly, save, saving, switch }The words.
PlanPrice–
{ monthly, yearly, period, index?, unit? }A plan's rolling price; index staggers rows.
components/ui/notchset/billing-toggle.tsx
This component is included with Pro.
Try the live preview above. Get Pro to install the source.