About
A Monthly/Yearly billing period switch for pricing pages, with a savings note underneath, built on a segmented control.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Pricing Toggle to your project and fits it to your theme.
Code
How Pricing Toggle is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import * as React from "react";
import {
PricingToggle,
type BillingCadence,
} from "@/components/ui/pricing-toggle";
export default function PricingToggleDemo() {
const [cadence, setCadence] = React.useState<BillingCadence>("monthly");
return (
<div className="flex min-h-[200px] w-full items-center justify-center bg-bg p-8">
<PricingToggle value={cadence} onChange={setCadence} />
</div>
);
}















