Loading craft...
Loading craft...
Animated pill navigation paired with a blur-fade content stage so you can tell long-form product stories without switching sections.
I saw a hero section on Doppler.com that stacked headline, stats, and integrations onto one cinematic surface, so I re-created the interaction with a springy pill, shared layoutId, blur-in copy, and a generous content stage tuned for narrative-heavy launches.
1import AnimatedTabs from '@/craft/components/animated-tabs';23const tabs = [4{5label: 'Security',6title: 'Secure secrets',7content: (89<div className="space-y-3">10<p className="text-base text-muted-foreground">11Narrative copy with compliance callouts, breach data, and a CTA stack.12</p>13<div className="grid gap-2 md:grid-cols-3">14<div className="rounded-xl border border-border bg-background/80 p-3">15<p className="text-xs uppercase tracking-wide text-muted-foreground">Uptime</p>16<p className="text-2xl font-serif">99.99%</p>17</div>18{/* ...more stat cards */}19</div>20</div>21),22},23{24label: 'Integrations',25title: 'Central hub',26content: <p>Logos, badges, and webhook copy go here.</p>,27},28];2930export function StoryTabs() {31return (32 <AnimatedTabs33 tabs={tabs}34 containerClassName="mx-auto"35 tabClassName="font-serif text-sm md:text-base"36 activeTabClassName="bg-primary/5 border border-border/40"37 contentClassName="bg-muted/40 backdrop-blur-xl"38 />39);40}
| Props | Description | Default |
|---|---|---|
tabs | Array of tab objects (`{ label, title, content }`). `content` accepts any React node, so you can inject marketing copy, media, or custom layouts. | [] |
containerClassName | Custom classes for the outer section. Perfect for width constraints, background treatments, or responsive padding tweaks. | - |
tabClassName | Shared classes for each tab button. Useful for typography, casing, spacing, or setting up your own hover states. | - |
activeTabClassName | Classes applied to the animated pill highlight. Combine with borders, gradients, or shadows to match your brand. | - |
contentClassName | Classes for the content surface. Use it to set min-heights, glassmorphism, borders, or layout primitives. | - |