Price morph
Pricing tiers with a monthly/yearly switch that works without JavaScript, and a save badge on yearly.
Preview
Switching the period morphs each price digit by digit, the save badge pops in on yearly, and a soft light crosses the featured plan once per switch. With reduced motion turned on, it renders the plain layout.
Simple pricing
Sample plans and prices.
Solo
For one product
$9per month
- 1 site
- All sections
- Email support
Studio
Most popularFor several launches
$29per month
- 10 sites
- All templates
- Priority support
Team
For agencies
$79per month
- Unlimited sites
- Shared themes
- Onboarding call
Simple pricing
Sample plans and prices.
Solo
For one product
$9per month
- 1 site
- All sections
- Email support
Studio
Most popularFor several launches
$29per month
- 10 sites
- All templates
- Priority support
Team
For agencies
$79per month
- Unlimited sites
- Shared themes
- Onboarding call
Installation
Run this in a project that already uses shadcn/ui. It adds the component and anything it needs; the motion version also adds the plain one and the motion package.
Usage
import { PriceMorph } from "@/components/custom/price-morph/price-morph";
<PriceMorph
title="Simple pricing"
plans={[
{
name: "Studio",
monthly: 29,
yearly: 276,
featured: true,
features: ["10 sites", "Priority support"],
cta: { label: "Choose Studio", href: monthlyCheckoutUrl, yearlyHref: yearlyCheckoutUrl },
},
]}
/>import { PriceMorphMotion } from "@/components/custom/price-morph/price-morph-motion";
<PriceMorphMotion plans={plans} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| plans* (required) | { name; description?; monthly; yearly; features; cta; featured? }[] | ā | `yearly` is the price per year. The saving is worked out from the two prices. |
| plans[].cta* (required) | { label; href; yearlyHref? } | ā | Any link, such as a checkout URL. `yearlyHref` is used while yearly is selected. |
| currency | string | "$" | Shown before each price. |
| monthlyLabel / yearlyLabel | string | "Monthly" / "Yearly" | Switch labels. |
| featuredLabel | string | "Most popular" | Badge on the featured plan. |
| title / description | string | ā | Heading (h2) and line under it. |
| ...props | React.ComponentProps<"section"> | ā | Any other section attribute (id, aria-*, data-*, ref) goes to the root element. |
| Prop | Type | Default | Description |
|---|---|---|---|
| plans* (required) | { name; description?; monthly; yearly; features; cta; featured? }[] | ā | `yearly` is the price per year. The saving is worked out from the two prices. |
| plans[].cta* (required) | { label; href; yearlyHref? } | ā | Any link, such as a checkout URL. `yearlyHref` is used while yearly is selected. |
| currency | string | "$" | Shown before each price. |
| monthlyLabel / yearlyLabel | string | "Monthly" / "Yearly" | Switch labels. |
| featuredLabel | string | "Most popular" | Badge on the featured plan. |
| title / description | string | ā | Heading (h2) and line under it. |
| ...props | React.ComponentProps<"section"> | ā | Any other section attribute (id, aria-*, data-*, ref) goes to the root element. |
Accessibility
- The switch is a radio group named āBilling periodā; arrow keys change it.
- Without JavaScript the switch still works: CSS reads the checked radio.
- Each plan is a list item named after the plan, with its own h3.
- The motion version follows the visitor's reduced-motion setting and never hides content before it animates.