Pricing · Free prompt
Pricing Section
Pricing Section is a complete, paste-ready pricing build-prompt — a full art-direction spec for Lovable, Bolt, v0, Cursor and Claude. It's free: copy it below and paste it into your builder.

Pricing SectionPricing · free prompt · copy-paste
A comprehensive pricing section component that combines animated tabs and pricing cards. Originally built for Dub.co's pricing page.
Features
- Monthly/yearly frequency toggle with discount badge
- Animated tab selection
- Four-tier pricing layout
- Highlighted and popular tier states
- Grid background pattern with mask effect
- Dark mode support
- Responsive grid layout (1 column on mobile, 2 on tablet, 4 on desktop)
— Install —
npx shadcn@latest add "https://21st.dev/r/pricing-section"
— Component source (Pricing Section.tsx) —
"use client"
import * as React from "react"
import { PricingCard, type PricingTier } from "@/components/ui/pricing-card"
import { Tab } from "@/components/ui/pricing-tab"
interface PricingSectionProps {
title: string
subtitle: string
tiers: PricingTier[]
frequencies: string[]
}
export function PricingSection({
title,
subtitle,
tiers,
frequencies,
}: PricingSectionProps) {
const [selectedFrequency, setSelectedFrequency] = React.useState(frequencies[0])
return (
<section className="flex flex-col items-center gap-10 py-10">
<div className="space-y-7 text-center">
<div className="space-y-4">
<h1 className="text-4xl font-medium md:text-5xl">{title}</h1>
<p className="text-muted-foreground">{subtitle}</p>
</div>
<div className="mx-auto flex w-fit rounded-full bg-muted p-1">
{frequencies.map((freq) => (
<Tab
key={freq}
text={freq}
selected={selectedFrequency === freq}
setSelected={setSelectedFrequency}
discount={freq === "yearly"}
/>
))}
</div>
</div>
<div className="grid w-full max-w-6xl gap-6 sm:grid-cols-2 xl:grid-cols-4">
{tiers.map((tier) => (
<PricingCard
key={tier.name}
tier={tier}
paymentFrequency={selectedFrequency}
/>
))}
</div>
</section>
)
}
Browse & preview free Unlock everything — from $19/mo





