Split Plan Pricing Cards
Two side-by-side cards that overlap a diagonal silk ribbon. The white Standard card shows a description, a small purple pill button and a tinted panel with a big price (2.9% + 30¢). The dark navy Custom card has a cyan pill CTA and a stack of translucent blue option tiles.
Rebuilt from stripe.com/pricing in the Iridescent Ledger style.
Looks exactly like stripe.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
All copy is exposed as props (heading, standardTitle, price, options array, CTAs); renders standalone with defaults. Hover lifts the cards and slides the chevrons.
components/split-plan-cards.tsx
"use client"; import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react"; type Props = { heading?: string; standardTitle?: string; standardBody?: string; price?: string; priceNote?: string; standardCta?: string; customTitle?: string; customBody?: string; customCta?: string; options?: string[]; }; const Chevron = () => ( <svg aria-hidden viewBox="0 0 10 10" className="h-2.5 w-2.5 transition-transform duration-300 group-hover:translate-x-[3px]" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"> <path d="M3 1.5 6.5 5 3 8.5" /> </svg> ); export default function SplitPlanPricingCards({ heading = "Simple rates for teams of every scale", standardTitle = "Basic", standardBody = "Get a full billing toolkit with straightforward usage-based rates. No onboarding charges, no monthly minimums, no surprises.", price = "1.9% + 25¢", priceNote = "per completed charge for local cards", standardCta = "Start now", customTitle = "Enterprise", customBody = "Tailored terms for companies with high volume or unusual requirements.", customCta = "Talk to us", options = ["Blended rates", "Tiered volume savings", "Bundle discounts", "Regional pricing"], }: Props) { return ( <section className="relative isolate overflow-hidden bg-canvas py-20 font-sans"> <div aria-hidden className="pointer-events-none absolute inset-x-0 bottom-0 -z-10 h-[360px]"> <div className="absolute -inset-x-20 bottom-10 h-40 -rotate-[10deg] bg-[linear-gradient(90deg,var(--color-accent),var(--color-signal-magenta),var(--color-signal-orange),var(--color-accent-soft))] opacity-90 blur-[2px]" /> <div className="absolute inset-0 bg-[linear-gradient(transparent,var(--color-canvas))] opacity-40" /> </div> <div className="mx-auto max-w-[1080px] px-4"> <Reveal> <h2 className="max-w-xl text-4xl font-semibold tracking-[-0.02em] text-ink-deep md:text-6xl">{heading}</h2> </Reveal> <div className="mt-16 grid gap-4 lg:grid-cols-2"> <article className="grid overflow-hidden rounded-md border border-hairline bg-surface shadow-card transition-all duration-300 hover:-translate-y-1 hover:shadow-floating sm:grid-cols-2"> <div className="flex flex-col p-8"> <h3 className="text-2xl font-semibold text-ink-deep">{standardTitle}</h3> <p className="mt-4 flex-1 text-ink-muted">{standardBody}</p> <a href="#" className="group mt-6 inline-flex w-fit items-center gap-2 rounded-pill bg-accent px-4 py-2 text-sm font-medium text-surface transition-colors hover:bg-accent-soft hover:text-accent focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent"> {standardCta} <Chevron /> </a> </div> <div className="m-1 flex flex-col items-center justify-center bg-surface-tint p-8 text-center"> <p className="text-2xl font-semibold text-ink-deep">{price}</p> <p className="mt-2 text-ink-muted">{priceNote}</p> </div> </article> <article className="grid overflow-hidden rounded-md bg-night shadow-card transition-all duration-300 hover:-translate-y-1 hover:shadow-floating sm:grid-cols-2"> <div className="flex flex-col p-8"> <h3 className="text-2xl font-semibold text-surface">{customTitle}</h3> <p className="mt-4 flex-1 text-[#b8c7dc]">{customBody}</p> <a href="#" className="group mt-6 inline-flex w-fit items-center gap-2 rounded-pill bg-cyan-action px-4 py-2 text-sm font-medium text-night transition-opacity hover:opacity-80 focus-visible:outline focus-visible:outline-2 focus-visible:outline-surface"> {customCta} <Chevron /> </a> </div> <ul className="m-1 grid gap-1"> {options.map((o) => ( <li key={o} className="flex items-center justify-center bg-[#1d4a78]/70 px-4 py-5 text-surface">{o}</li> ))} </ul> </article> </div> <nav aria-label="Pricing sections" className="mx-auto mt-10 flex w-fit gap-6 rounded-pill bg-surface/80 px-6 py-3 text-sm font-medium text-ink-deep backdrop-blur-[5px]"> <a href="#">Basic rates</a> <a href="#">Enterprise rates</a> <a href="#">FAQ</a> </nav> </div> </section> ); } // ---- Yoink motion (inlined, no dependencies): Reveal ---- const YK_EASE = "cubic-bezier(0.16, 1, 0.3, 1)"; const useYkLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect; function ykReducedMotion(): boolean { return typeof window !== "undefined" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches; } // "idle": untouched (visible) · "hidden": waiting below the fold · "shown": play the entrance. // Content is only hidden once we know we can show it again (IntersectionObserver exists, motion allowed, // and there is a box to watch), and a safety net reveals anything on screen that is still hidden. type YkRevealState = "idle" | "hidden" | "shown"; function useYkReveal(ref: RefObject<Element | null>, once = true): YkRevealState { const [state, setState] = useState<YkRevealState>("idle"); useYkLayoutEffect(() => { const el = ref.current; if (!el || ykReducedMotion() || typeof IntersectionObserver === "undefined") return; // watch the element's own box, or its children when it has none (display: contents) const boxes = () => (getComputedStyle(el).display === "contents" ? Array.from(el.children) : [el]); const onScreen = (t: Element) => { const r = t.getBoundingClientRect(); return (r.width > 0 || r.height > 0) && r.bottom > 0 && r.right > 0 && r.top < window.innerHeight && r.left < window.innerWidth; }; if (!boxes().some((t) => t.getBoundingClientRect().width > 0 || t.getBoundingClientRect().height > 0)) return; // e.g. hidden at mount: leave it visible let shown = false; const show = (v: boolean) => { if (v !== shown) (shown = v), setState(v ? "shown" : "hidden"); }; setState("hidden"); const inView = new Set<Element>(); const io = new IntersectionObserver((entries) => { for (const e of entries) { if (e.isIntersecting) inView.add(e.target); else inView.delete(e.target); } if (inView.size) { show(true); if (once) io.disconnect(); } else if (!once) show(false); }); const watched = new Set<Element>(); const watch = () => boxes().forEach((t) => !watched.has(t) && (watched.add(t), io.observe(t))); watch(); // safety net: styles that land after mount (display: contents) get watched too, and nothing // stays hidden for more than a moment while it is actually on screen const start = Date.now(); const net = setInterval(() => { if (shown) return once && clearInterval(net); watch(); if (Date.now() - start > 2400 && boxes().some(onScreen)) show(true); }, 600); return () => { io.disconnect(); clearInterval(net); }; }, [once]); return state; } type YkRevealFrom = "up" | "down" | "left" | "right" | "scale" | "blur" | "none"; /** Fades content in as it scrolls into view. */ function Reveal({ children, from = "up", delay = 0, duration = 700, distance = 24, once = true, as = "div", className, style, }: { children?: ReactNode; from?: YkRevealFrom; delay?: number; duration?: number; distance?: number; once?: boolean; as?: ElementType; className?: string; style?: CSSProperties; }) { const Tag = as; const ref = useRef<HTMLElement>(null); const state = useYkReveal(ref, once); const hidden = state === "hidden"; const offset = { up: `translate3d(0, ${distance}px, 0)`, down: `translate3d(0, ${-distance}px, 0)`, left: `translate3d(${-distance}px, 0, 0)`, right: `translate3d(${distance}px, 0, 0)`, scale: "scale(0.94)", blur: `translate3d(0, ${distance / 2}px, 0)`, none: "none", }[from]; const t = `${duration}ms ${YK_EASE} ${delay}ms`; return ( <Tag ref={ref} className={className} style={{ ...style, ...(hidden && { opacity: 0, transform: offset, filter: from === "blur" ? "blur(12px)" : undefined }), ...(state === "shown" && { transition: `opacity ${t}, transform ${t}, filter ${t}` }), }} > {children} </Tag> ); }"use client"; import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react"; type Props = { heading?: string; standardTitle?: string; standardBody?: string; price?: string; priceNote?: string; standardCta?: string; customTitle?: string; customBody?: string; customCta?: string; options?: string[]; }; const Chevron = () => ( <svg aria-hidden viewBox="0 0 10 10" className="h-2.5 w-2.5 transition-transform duration-300 group-hover:translate-x-[3px]" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"> <path d="M3 1.5 6.5 5 3 8.5" /> </svg> ); export default function SplitPlanPricingCards({ heading = "Simple rates for teams of every scale", standardTitle = "Basic", standardBody = "Get a full billing toolkit with straightforward usage-based rates. No onboarding charges, no monthly minimums, no surprises.", price = "1.9% + 25¢", priceNote = "per completed charge for local cards", standardCta = "Start now", customTitle = "Enterprise", customBody = "Tailored terms for companies with high volume or unusual requirements.", customCta = "Talk to us", options = ["Blended rates", "Tiered volume savings", "Bundle discounts", "Regional pricing"], }: Props) { return ( <section className="relative isolate overflow-hidden bg-background py-20 font-sans"> <div aria-hidden className="pointer-events-none absolute inset-x-0 bottom-0 -z-10 h-[360px]"> <div className="absolute -inset-x-20 bottom-10 h-40 -rotate-[10deg] bg-[linear-gradient(90deg,var(--color-primary),var(--color-iridescent-signal-magenta),var(--color-iridescent-signal-orange),var(--color-iridescent-accent-soft))] opacity-90 blur-[2px]" /> <div className="absolute inset-0 bg-[linear-gradient(transparent,var(--color-background))] opacity-40" /> </div> <div className="mx-auto max-w-[1080px] px-4"> <Reveal> <h2 className="max-w-xl text-4xl font-semibold tracking-[-0.02em] text-muted-foreground md:text-6xl">{heading}</h2> </Reveal> <div className="mt-16 grid gap-4 lg:grid-cols-2"> <article className="grid overflow-hidden rounded-md border border-border bg-card shadow-iridescent-card transition-all duration-300 hover:-translate-y-1 hover:shadow-iridescent-floating sm:grid-cols-2"> <div className="flex flex-col p-8"> <h3 className="text-2xl font-semibold text-muted-foreground">{standardTitle}</h3> <p className="mt-4 flex-1 text-muted-foreground">{standardBody}</p> <a href="#" className="group mt-6 inline-flex w-fit items-center gap-2 rounded-full bg-primary px-4 py-2 text-sm font-medium text-card transition-colors hover:bg-iridescent-accent-soft hover:text-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary"> {standardCta} <Chevron /> </a> </div> <div className="m-1 flex flex-col items-center justify-center bg-muted p-8 text-center"> <p className="text-2xl font-semibold text-muted-foreground">{price}</p> <p className="mt-2 text-muted-foreground">{priceNote}</p> </div> </article> <article className="grid overflow-hidden rounded-md bg-foreground shadow-iridescent-card transition-all duration-300 hover:-translate-y-1 hover:shadow-iridescent-floating sm:grid-cols-2"> <div className="flex flex-col p-8"> <h3 className="text-2xl font-semibold text-card">{customTitle}</h3> <p className="mt-4 flex-1 text-[#b8c7dc]">{customBody}</p> <a href="#" className="group mt-6 inline-flex w-fit items-center gap-2 rounded-full bg-iridescent-cyan-action px-4 py-2 text-sm font-medium text-foreground transition-opacity hover:opacity-80 focus-visible:outline focus-visible:outline-2 focus-visible:outline-card"> {customCta} <Chevron /> </a> </div> <ul className="m-1 grid gap-1"> {options.map((o) => ( <li key={o} className="flex items-center justify-center bg-[#1d4a78]/70 px-4 py-5 text-card">{o}</li> ))} </ul> </article> </div> <nav aria-label="Pricing sections" className="mx-auto mt-10 flex w-fit gap-6 rounded-full bg-card/80 px-6 py-3 text-sm font-medium text-muted-foreground backdrop-blur-[5px]"> <a href="#">Basic rates</a> <a href="#">Enterprise rates</a> <a href="#">FAQ</a> </nav> </div> </section> ); } // ---- Yoink motion (inlined, no dependencies): Reveal ---- const YK_EASE = "cubic-bezier(0.16, 1, 0.3, 1)"; const useYkLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect; function ykReducedMotion(): boolean { return typeof window !== "undefined" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches; } // "idle": untouched (visible) · "hidden": waiting below the fold · "shown": play the entrance. // Content is only hidden once we know we can show it again (IntersectionObserver exists, motion allowed, // and there is a box to watch), and a safety net reveals anything on screen that is still hidden. type YkRevealState = "idle" | "hidden" | "shown"; function useYkReveal(ref: RefObject<Element | null>, once = true): YkRevealState { const [state, setState] = useState<YkRevealState>("idle"); useYkLayoutEffect(() => { const el = ref.current; if (!el || ykReducedMotion() || typeof IntersectionObserver === "undefined") return; // watch the element's own box, or its children when it has none (display: contents) const boxes = () => (getComputedStyle(el).display === "contents" ? Array.from(el.children) : [el]); const onScreen = (t: Element) => { const r = t.getBoundingClientRect(); return (r.width > 0 || r.height > 0) && r.bottom > 0 && r.right > 0 && r.top < window.innerHeight && r.left < window.innerWidth; }; if (!boxes().some((t) => t.getBoundingClientRect().width > 0 || t.getBoundingClientRect().height > 0)) return; // e.g. hidden at mount: leave it visible let shown = false; const show = (v: boolean) => { if (v !== shown) (shown = v), setState(v ? "shown" : "hidden"); }; setState("hidden"); const inView = new Set<Element>(); const io = new IntersectionObserver((entries) => { for (const e of entries) { if (e.isIntersecting) inView.add(e.target); else inView.delete(e.target); } if (inView.size) { show(true); if (once) io.disconnect(); } else if (!once) show(false); }); const watched = new Set<Element>(); const watch = () => boxes().forEach((t) => !watched.has(t) && (watched.add(t), io.observe(t))); watch(); // safety net: styles that land after mount (display: contents) get watched too, and nothing // stays hidden for more than a moment while it is actually on screen const start = Date.now(); const net = setInterval(() => { if (shown) return once && clearInterval(net); watch(); if (Date.now() - start > 2400 && boxes().some(onScreen)) show(true); }, 600); return () => { io.disconnect(); clearInterval(net); }; }, [once]); return state; } type YkRevealFrom = "up" | "down" | "left" | "right" | "scale" | "blur" | "none"; /** Fades content in as it scrolls into view. */ function Reveal({ children, from = "up", delay = 0, duration = 700, distance = 24, once = true, as = "div", className, style, }: { children?: ReactNode; from?: YkRevealFrom; delay?: number; duration?: number; distance?: number; once?: boolean; as?: ElementType; className?: string; style?: CSSProperties; }) { const Tag = as; const ref = useRef<HTMLElement>(null); const state = useYkReveal(ref, once); const hidden = state === "hidden"; const offset = { up: `translate3d(0, ${distance}px, 0)`, down: `translate3d(0, ${-distance}px, 0)`, left: `translate3d(${-distance}px, 0, 0)`, right: `translate3d(${distance}px, 0, 0)`, scale: "scale(0.94)", blur: `translate3d(0, ${distance / 2}px, 0)`, none: "none", }[from]; const t = `${duration}ms ${YK_EASE} ${delay}ms`; return ( <Tag ref={ref} className={className} style={{ ...style, ...(hidden && { opacity: 0, transform: offset, filter: from === "blur" ? "blur(12px)" : undefined }), ...(state === "shown" && { transition: `opacity ${t}, transform ${t}, filter ${t}` }), }} > {children} </Tag> ); }
Quality checks
Automated, in a real browser · 5d ago- Accessible: passedNo serious accessibility problems (axe-core): readable contrast, labelled buttons and images.
- Responsive: passedRenders at phone (390px), tablet (768px) and desktop width without sideways scrolling.
- Dark mode: not passedElements must meet minimum color contrast ratio thresholds (5 elements)
- Themeable: not passed2 hard-coded colours (text-[#b8c7dc], bg-[#1d4a78]/70). These ignore the theme and break dark mode.
- Animates cleanly: passedIts animation plays and finishes with everything visible, and it stays still for people who turn on reduced motion.