Subscription Details
subscription-details is a full-width pricing section block that shows four subscription plans (Starter, Professional, Business, Enterprise) with a Monthly/Annual toggle that recalculates prices with animated number transitions. Each card fades and blurs in on scroll using a staggered motion timeline.
Installation
Usage
import { SubscriptionDetails } from '@/components/subscription-details'export default function Page() { return <SubscriptionDetails />}- Showing tiered SaaS or subscription plans on a landing or pricing page that need a monthly/annual switch.
- Pages that want a polished, scroll-triggered entrance animation for pricing cards without writing motion code.
- Starting point for a pricing section whose copy and plan data you will later replace by editing the PLANS constant.
- Any case where you need the staggered TimelineAnimation wrapper reused for other sections (the component is installed alongside the block).
Examples
Basic pricing page
Render the full subscription section as-is. The plans and copy are defined inside the block's PLANS constant.
import { SubscriptionDetails } from '@/components/subscription-details'export default function PricingPage() { return ( <main> <SubscriptionDetails /> </main> )}Reusing TimelineAnimation for a custom heading
TimelineAnimation is installed as a separate component. It animates when the referenced element scrolls into view; pass a ref to the container and a unique animationNum for the stagger order.
import { useRef } from 'react'import { TimelineAnimation } from '@/components/ui/timeline-animation'export function FeatureIntro() { const timelineRef = useRef<HTMLDivElement>(null) return ( <div ref={timelineRef} className="py-16"> <TimelineAnimation animationNum={1} timelineRef={timelineRef} as="h2" className="text-3xl font-bold"> Simple, transparent pricing </TimelineAnimation> <TimelineAnimation animationNum={2} timelineRef={timelineRef} as="p" className="text-neutral-500"> Pick the plan that fits your team. </TimelineAnimation> </div> )}Fade-only custom variants
Pass customVariants to replace the default blur-and-slide animation with your own motion variants. The custom function receives the animationNum as its custom value.
import { useRef } from 'react'import type { Variants } from 'motion/react'import { TimelineAnimation } from '@/components/ui/timeline-animation'const fadeOnly: Variants = { hidden: { opacity: 0 }, visible: (i: number) => ({ opacity: 1, transition: { delay: i * 0.2, duration: 0.4 }, }),}export function FadeList() { const timelineRef = useRef<HTMLDivElement>(null) return ( <div ref={timelineRef}> {[1, 2, 3].map((n) => ( <TimelineAnimation key={n} animationNum={n} timelineRef={timelineRef} customVariants={fadeOnly} once={false}> <p>Item {n}</p> </TimelineAnimation> ))} </div> )}API reference
Accessibility
- The subscribe and plan toggle controls are shadcn Buttons, so they are focusable and keyboard operable; the Monthly/Annual toggle does not currently expose aria-pressed, so consider adding aria-pressed={billing === 'monthly'} for screen readers.
- The decorative featured-card photo uses alt="" so it is hidden from assistive technology.
- The Subscribe button's SVG icon has no title or aria-hidden attribute; add aria-hidden="true" to the svg if the button label is sufficient.
- Animations rely on opacity and blur; users with prefers-reduced-motion should be considered, for example by using customVariants that skip movement.
- Plan cards use a div and span structure rather than semantic list or heading elements; consider using a ul/li list for features and headings for plan names.
- Text contrast on the neutral-400 plan name and the white/40 feature dots over black may be low; verify contrast against WCAG AA.
Docs written by anthropic:claude-haiku-5-5 from the registry source.
Use with Coding Agent
Paste this into Claude Code, Codex or Cursor. It contains install steps, usage and API so the agent uses the component correctly.
Use the "Subscription Details" component (ui-layouts/subscription-details) from its shadcn registry.1. Install it with: npx shadcn@latest add https://ui-layouts.com/r/subscription-details.json2. Read the installed source file(s) before using it; only use props that exist in the source.3. Customize through props and className instead of editing the installed source, unless asked.4. Available props: SubscriptionDetails, children, animationNum, timelineRef, className, as, customVariants, once, ...props.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { SubscriptionDetails } from '@/components/subscription-details'export default function Page() { return <SubscriptionDetails />}```Files & dependencies
- ../../packages/blocks/src/pricing-section/subscription-details.tsx
- ./components/ui/timeline-animation.tsx
Looks similar, elsewhere
There is no screenshot of this item to compare yet.