CrazyGLCrazyGLHomeExploreGitHubBrowse heroesLoading hero…← Back to gallery@crazygl/card-expand-reveal

Card Expand Reveal

Horizontal accordion of cards — the active card stretches to reveal an inner story, others compress to vertical labels. Auto-cycles on idle.

ReactInteractiveFont#accordion#expand#typography

Usage

import CardExpandReveal from '@crazygl/hero-card-expand-reveal';

export default function Page() {
  return (
    <CardExpandReveal
      card1Label="Design"
      card1Body="Brand identity from logo to ledger."
      card1Color="#ff5c8a"
      autoCycleSec={3.2}
    />
  );
}

Customise

  • Cards — four slots, each with cardNLabel, cardNBody, and onCardNClick (URL or function).
  • CycleautoCycleSec, the idle dwell time per card before advancing.
  • Colours — per-card cardNColor, plus labelColor, bodyColor, headingFontFamily, headingFontWeight.
  • BackdroptransparentBackground, bgColor.

Best for

  • Service/process overviews (Design → Build → Ship)
  • Product feature highlights and pricing-tier teasers
  • Portfolio or agency landing sections that reward exploration
01 · Install the package

One command, zero config.

npm install @crazygl/hero-card-expand-reveal
02 · Render the component

Import once, drop it in.

The component takes the same props you see in the live customizer on the right — every default ships poster-quality.

hero.tsx
import CardExpandReveal from '@crazygl/hero-card-expand-reveal';

export default function Landing() {
  return (
    <CardExpandReveal />
  );
}
03 · Use it in a page

SSR-safe by default.

The wrapper renders static HTML on the server and only initialises the canvas after hydration, so search engines see your copy.

page.tsx
// app/page.tsx — works in SSR-first frameworks (Next, Remix, Astro, etc.)
'use client';

import CardExpandReveal from '@crazygl/hero-card-expand-reveal';

export default function Page() {
  return (
    <section>
      <CardExpandReveal
        heading="Say hi."
        subheading="Your new hero."
      />
      <article>
        <h2>Welcome</h2>
        <p>Your content keeps its own voice below the hero.</p>
      </article>
    </section>
  );
}
You might also like

Similar heroes

Text Reveal

Heading wiped in from a single direction via a hard clip-path mask, with a small per-letter delay — the foundational reveal everyone needs.

Text Split Reveal

Heading splits into two halves that slide apart to reveal a secondary line between them — the curtain-pull pattern.

Text Hover Reveal

Each item shows a default heading; on hover the heading scrolls up and a secondary line scrolls in from below — list-of-services interaction.

Hover Text Reveal

A row of phrases where hovering one expands a stagger-typed paragraph beside it — the kind of FAQ heading-list interaction premium SaaS sites use.

Mask Text Reveal

Text revealed as a moving circular mask sweeps across — the headline appears only where the image-shaped mask uncovers it.

Cursor Reveal Text

Two stacked paragraphs — a primary line shown in the surface colour, and a secret reveal line shown only inside a cursor-following spotlight that grows on hover.
Live customizer

Card Expand Reveal

Card 1 labelCard 1 bodyCard 1 link / handlerURL to navigate to when clicked. From code you can also pass a function — same prop name, type-detected at runtime.Card 2 labelCard 2 bodyCard 2 link / handlerURL or function — see Card 1.Card 3 labelCard 3 bodyCard 3 link / handlerURL or function — see Card 1.Card 4 labelCard 4 bodyCard 4 link / handlerURL or function — see Card 1.Auto cycle (s)3.2sCard 1 colourCard 2 colourCard 3 colourCard 4 colourLabel colourBody colourFontWeight700Transparent backgroundBackground
CrazyGL · crazygl.comProgrammable hero sections for real websites.