Serif Page Title with Plan Slider
Centered serif page title with silver gradient and a single gray subline, followed by a plan volume selector (3,000, 50,000, 100,000 … tier chips) that fades in. Prices live on dark hairline plan cards.
Rebuilt from resend.com/pricing in the Obsidian Serif Glow style.
Looks exactly like resend.com: brings its fonts and colours, namespaced so your own theme stays untouched.
Restyled to your project: uses your shadcn colours, fonts and radius, so it matches the rest of your app. Layout, type sizes and motion stay as designed.
Usage
Props: title, subtitle, tiers (number array for volume chips) and plans (name, blurb, base, perTier, features, featured). Selecting a chip recalculates each plan price as base + perTier × tier index; the selector fades in over 240ms on load.
components/pricing-page-header.tsx
import { useState, useEffect } from "react"; type Plan = { name: string; blurb: string; base: number; perTier: number; features: string[]; featured?: boolean }; export default function SerifPageTitleWithPlanSlider(props: { title?: string; subtitle?: string; tiers?: number[]; plans?: Plan[]; }) { const { title = "Plans", subtitle = "Pick a volume, pay only for what you use.", tiers = [5000, 25000, 75000, 250000], plans = [ { name: "Starter", blurb: "For side projects and early tests.", base: 0, perTier: 0, features: ["1 workspace", "Community support", "7-day history"] }, { name: "Team", blurb: "For growing teams shipping weekly.", base: 24, perTier: 18, features: ["Unlimited workspaces", "Email support", "90-day history", "Shared dashboards"], featured: true }, { name: "Scale", blurb: "For high-volume production loads.", base: 120, perTier: 60, features: ["Dedicated capacity", "Priority support", "1-year history", "Audit exports"] }, ], } = props; const [idx, setIdx] = useState(0); const [shown, setShown] = useState(false); useEffect(() => { const t = requestAnimationFrame(() => setShown(true)); return () => cancelAnimationFrame(t); }, []); return ( <section className="bg-background px-4 py-20 text-primary sm:py-28"> <div className="mx-auto max-w-5xl text-center"> <h2 className="bg-silver-text bg-clip-text font-serif text-6xl text-transparent sm:text-7xl">{title}</h2> <p className="mt-4 text-body text-secondary">{subtitle}</p> <div className={`mt-12 flex flex-wrap justify-center gap-2 transition-opacity duration-[240ms] ease-[cubic-bezier(0.36,0.66,0.6,1)] motion-reduce:transition-none ${shown ? "opacity-100" : "opacity-0"}`} role="radiogroup" aria-label="Monthly volume" > {tiers.map((t, i) => ( <button key={t} role="radio" aria-checked={i === idx} onClick={() => setIdx(i)} className={`rounded-pill border px-4 py-2 font-mono text-ui transition-colors duration-hover-color ease-hover-color focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-blue ${i === idx ? "border-hairline bg-surface-high text-primary" : "border-hairline-soft bg-surface text-secondary hover:text-primary"}`} > {t.toLocaleString()} </button> ))} </div> <div className="mt-10 grid gap-4 text-left md:grid-cols-3"> {plans.map((p) => { const price = p.base + p.perTier * idx; return ( <article key={p.name} className={`rounded-xl border bg-surface p-6 shadow-inset-highlight ${p.featured ? "border-accent-blue/50 shadow-glow-blue" : "border-hairline"}`}> <h3 className="text-h2 text-primary">{p.name}</h3> <p className="mt-1 text-ui text-secondary">{p.blurb}</p> <p className="mt-6 font-mono text-4xl text-primary"> ${price}<span className="text-caption text-muted"> /mo</span> </p> <ul className="mt-6 space-y-2 border-t border-hairline-soft pt-4"> {p.features.map((f) => ( <li key={f} className="flex items-center gap-2 text-ui text-secondary"> <span className="h-1.5 w-1.5 rounded-pill bg-accent-green" /> {f} </li> ))} </ul> <button className={`mt-6 w-full rounded-md px-4 py-2 text-ui transition-colors duration-hover-color focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-blue ${p.featured ? "bg-paper text-background" : "bg-surface-raised text-primary hover:bg-surface-high"}`}> Choose {p.name} </button> </article> ); })} </div> </div> </section> ); }import { useState, useEffect } from "react"; type Plan = { name: string; blurb: string; base: number; perTier: number; features: string[]; featured?: boolean }; export default function SerifPageTitleWithPlanSlider(props: { title?: string; subtitle?: string; tiers?: number[]; plans?: Plan[]; }) { const { title = "Plans", subtitle = "Pick a volume, pay only for what you use.", tiers = [5000, 25000, 75000, 250000], plans = [ { name: "Starter", blurb: "For side projects and early tests.", base: 0, perTier: 0, features: ["1 workspace", "Community support", "7-day history"] }, { name: "Team", blurb: "For growing teams shipping weekly.", base: 24, perTier: 18, features: ["Unlimited workspaces", "Email support", "90-day history", "Shared dashboards"], featured: true }, { name: "Scale", blurb: "For high-volume production loads.", base: 120, perTier: 60, features: ["Dedicated capacity", "Priority support", "1-year history", "Audit exports"] }, ], } = props; const [idx, setIdx] = useState(0); const [shown, setShown] = useState(false); useEffect(() => { const t = requestAnimationFrame(() => setShown(true)); return () => cancelAnimationFrame(t); }, []); return ( <section className="bg-background px-4 py-20 text-foreground sm:py-28"> <div className="mx-auto max-w-5xl text-center"> <h2 className=" bg-clip-text font-sans text-6xl text-transparent sm:text-7xl">{title}</h2> <p className="mt-4 text-obsidian-body text-muted-foreground">{subtitle}</p> <div className={`mt-12 flex flex-wrap justify-center gap-2 transition-opacity duration-[240ms] ease-[cubic-bezier(0.36,0.66,0.6,1)] motion-reduce:transition-none ${shown ? "opacity-100" : "opacity-0"}`} role="radiogroup" aria-label="Monthly volume" > {tiers.map((t, i) => ( <button key={t} role="radio" aria-checked={i === idx} onClick={() => setIdx(i)} className={`rounded-full border px-4 py-2 font-mono text-obsidian-ui transition-colors duration-obsidian-hover-color ease-obsidian-hover-color focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary ${i === idx ? "border-border bg-muted text-foreground" : "border-obsidian-hairline-soft bg-card text-muted-foreground hover:text-foreground"}`} > {t.toLocaleString()} </button> ))} </div> <div className="mt-10 grid gap-4 text-left md:grid-cols-3"> {plans.map((p) => { const price = p.base + p.perTier * idx; return ( <article key={p.name} className={`rounded-2xl border bg-card p-6 shadow-obsidian-inset-highlight ${p.featured ? "border-primary/50 shadow-obsidian-glow-blue" : "border-border"}`}> <h3 className="text-obsidian-h2 text-foreground">{p.name}</h3> <p className="mt-1 text-obsidian-ui text-muted-foreground">{p.blurb}</p> <p className="mt-6 font-mono text-4xl text-foreground"> ${price}<span className="text-obsidian-caption text-muted-foreground"> /mo</span> </p> <ul className="mt-6 space-y-2 border-t border-obsidian-hairline-soft pt-4"> {p.features.map((f) => ( <li key={f} className="flex items-center gap-2 text-obsidian-ui text-muted-foreground"> <span className="h-1.5 w-1.5 rounded-full bg-obsidian-accent-green" /> {f} </li> ))} </ul> <button className={`mt-6 w-full rounded-lg px-4 py-2 text-obsidian-ui transition-colors duration-obsidian-hover-color focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary ${p.featured ? "bg-foreground text-background" : "bg-accent text-foreground hover:bg-muted"}`}> Choose {p.name} </button> </article> ); })} </div> </div> </section> ); }
Quality checks
Automated, in a real browser · 5d ago- Accessible: not passedElements must meet minimum color contrast ratio thresholds (3 elements)
- Responsive: passedRenders at phone (390px), tablet (768px) and desktop width without sideways scrolling.
- Dark mode: passedStill readable when installed in your theme and switched to dark mode.
- Themeable: passedUses design tokens rather than hard-coded colours, so it follows your theme cleanly.
- Animates cleanly: passedIts animation plays and finishes with everything visible, and it stays still for people who turn on reduced motion.