Pricing Section React block for Tailwind CSS v4
v1.0.0Added in 1.7.0
A compact plans section for a landing page: plans with a Monthly / Yearly switch, a highlighted plan, checklists and a button each.
Flip Monthly / Yearly (tap, drag the thumb, or arrow keys) and every price rolls to its new value while the line under it switches between billed monthly and billed yearly; the Yearly option carries a Save 20% pill worked out from the prices. The recommended plan stands out (raised, outlined or filled) with a Most popular pill and the solid button. Each plan's button follows its link, or runs onSelectPlan and shows a spinner while the returned promise is pending. Under the plans a Compare all features link leads to the full pricing page. In the cards layout a phone gets a swipeable rail that opens on the featured plan, with dots to jump between plans, or stacked cards; the split, minimal and single layouts stack into one column.
Pricing Section is a Pro React block in the React marketing sections category, written in TypeScript for React 19 and Tailwind CSS v4. It installs as source with npx wingo-ui@latest add pricing-section, together with Marketing Section, Badge, Button, Price, Segmented Control and 4 more and the npm package lucide-react.
Built with
The sections this page is made of. In the full-screen preview, hold Alt to outline each one on the page.
Add to a project
Requirements: React 19 and Tailwind CSS v4, in Next.js (App Router or Pages), Vite or React Router. Installation guide · Next.js setup · Vite setup
npx wingo-ui@latest add pricing-sectionPricing Section is part of Pro, with 298 more Pro items: $8 a month or $150 once. 14-day refund before you download any Pro item. See plans
Usage
Import PricingSection from @/components/blocks/pricing-section.
// app/(marketing)/page.tsx
"use client"
import Link from "next/link"
import { useRouter } from "next/navigation"
import { PricingSection } from "@/components/blocks/pricing-section"
export default function HomePricing() {
const router = useRouter()
return (
<PricingSection
linkComponent={Link}
id="pricing"
layout="cards"
defaultPeriod="yearly"
onSelectPlan={async (plan, period) => {
const res = await fetch("/api/checkout", { method: "POST", body: JSON.stringify({ plan: plan.id, period }) })
const { url } = await res.json()
router.push(url)
}}
/>
)
}Props
eyebrowdefault"Pricing"ReactNodeThe small line over the title.
titledefault"Simple pricing that grows with your team"ReactNodeThe section title.
descriptiondefault"Start free and upgrade when you need more. Every plan includes unlimited tasks and docs."ReactNodeThe paragraph under the title.
actionsReactNodeButtons under the heading.
plansdefault"PRICING_SECTION_SAMPLE"PricingSectionPlan[]The plans, in order: { id, name, description?, price: number | { monthly, yearly } (per user per month, yearly as the monthly equivalent), badge?, featured?, featuresTitle?, features?: string[], cta?: { label, href? }, note? }.
layoutdefault"cards""cards" | "split" | "minimal" | "single"cards: plans side by side under the heading; split: the heading, switch and compare link on the side with the plans stacked next to it; minimal: one row per plan with its top three features, price and button; single: the featured plan in depth, with its features in a grid and the other plans in one line.
aligndefault"center""start" | "center"Where the heading, switch and footer sit in the cards, minimal and single layouts. split always starts them at the side.
defaultPerioddefault"monthly""monthly" | "yearly"The billing period shown first while uncontrolled.
period"monthly" | "yearly"The billing period, controlled.
onPeriodChange(period: PricingSectionPeriod) => voidFires when the switch changes the period.
showToggledefaulttruebooleanShows the Monthly / Yearly switch. It hides by itself when no plan has a yearly price.
featuredPlandefault""stringThe id of the highlighted plan, and the plan the single layout shows. Empty uses the plan marked featured (Pro in the sample).
featuredStyledefault"raised""raised" | "outline" | "inverted"How the featured plan stands out: raised floats higher and is a little taller, outline draws a ring in the tone, inverted fills it with the tone.
mobileLayoutdefault"rail""rail" | "stack"The cards layout below 768px: a swipeable snap rail that opens on the featured plan, with dots, or the cards stacked.
showComparedefaulttruebooleanShows the Compare all features link under the plans.
compareHrefdefault"/pricing"stringWhere the compare link goes, usually the full pricing page.
animatePricedefaulttruebooleanPrices roll their digits on a period change. Reduced motion shows the new value at once.
currencydefault"USD"stringISO 4217 code; amounts are in major units.
localedefault""stringBCP 47 locale for the prices. Empty uses the UIProvider locale, then the browser's.
tonedefault"neutral""neutral" | "brand" | "success" | "warning" | "danger" | "info"The featured plan's ring, fill, pill and button, and the checklist ticks.
colordefault""stringAny CSS color; replaces the tone. Leave empty to use the tone.
savingsTonedefault"success""neutral" | "brand" | "success" | "warning" | "danger" | "info"The Save 20% pill on the Yearly option.
radiusdefault"lg""sm" | "md" | "lg"Plan card corners: 12, 16 or 24px.
backgrounddefault"none""none" | "muted"muted sets the section on a gray band.
spacingdefault"md""none" | "sm" | "md" | "lg"Vertical padding of the section.
widthdefault"lg""sm" | "md" | "lg" | "xl"The content column: 720, 960, 1200 or 1400px.
onSelectPlan(plan: PricingSectionPlan, period: PricingSectionPeriod) => unknownRuns instead of following the plan's link (start a checkout); a returned promise keeps that button loading.
linkComponent(props: LinkComponentProps) => ReactNodeThe router link for plan buttons and the compare link (next/link in an app); default the LinkProvider's.
labelsPartial<PricingSectionLabels>billingPeriod, monthly, yearly, save(percent), perMonth, billedMonthly, billedYearly, free, popular, included, otherPlans, plans, showPlan(name), compare and footnote (empty hides it).
classNamestringClasses for the <section>.
classNamesPartial<Record<PricingSectionSlot, string>>Classes for aside, toggle, list, plan, name, badge, description, price, billing, features, feature, cta, note, dots, footer and compare.
Parts
PRICING_SECTION_SAMPLE
constantAcme's Free, Pro ($12, featured) and Business ($24) plans, 20% off yearly.
DEFAULT_PRICING_SECTION_LABELS
constantThe English strings.
PricingSectionPlan
typeOne pricing plan card: id, name, price, badge, features, the call to action and a note.
id*stringStable key, also what featuredPlan matches.
name*stringThe plan name.
descriptionstringWho it is for, one line.
price*number | { monthly: number; yearly: number }Per user per month; yearly is the monthly equivalent when paid yearly. 0 reads as free.
badgeReactNodeA pill next to the name; the featured plan shows Most popular when left out.
featuredbooleanThe recommended plan.
featuresTitlestringA line over the checklist, e.g. "Everything in Free, plus:".
featuresstring[]The checklist.
cta{ label: string; href?: string }The plan's button.
notestringA small line under the button.
PricingSectionProps
typeProps of PricingSection.
Examples
Cards with a filled featured plan
Three plans side by side, Pro filled in the brand tone; a phone swipes through them on a rail.
Split
The heading, switch and compare link stay on the side while the plans stack next to them; buttons start a pretend checkout.
Minimal rows
One row per plan with its top three features, on a gray band, the featured row outlined.
Single plan
Pro in depth: price, switch and button on the left, everything it includes on the right, the other plans in one line.
Two plans, stacked on phones
Pro and Business only, Business recommended, cards stacked below 768px instead of a rail.
Dependencies
Files
- components/blocks/pricing-section.tsx
FAQ
Is the React Pricing Section block free?
The preview, props and docs are free; copying the source needs a Pro plan. See plans.
How do I install Pricing Section?
Run npx wingo-ui@latest add pricing-section. It also adds the Wingo UI items it builds on (Marketing Section, Badge, Button, Price, Segmented Control and 4 more) and the npm package lucide-react. With shadcn, add the @wingo-ui registry with your API key, then run npx shadcn@latest add @wingo-ui/pricing-section.
See also
More React marketing sections
Articles using this component
- AI SaaS Landing Page Template: The 4 Sections It Needs
Build it: screens and apps9 min read
- Claude Code Landing Page That Does Not Look AI-Made
Building UI with AI agents11 min read
New components by email
New posts, product news and occasional offers from Wingo UI. We count clicks to keep it relevant.