Skip to content
ReactHive

Card Deal

Cards dealt into a grid on the wind. As you scroll, one card after another rises from the lower corner on its side of the grid, nearly edge on, turned and curled on its inner edge like a sheet of paper, tinted by the light, then untwists, flattens into its cell and goes clean as the next one lands. The light behind the grid grows as the cards land and follows the pointer, glowing through the gaps between them.

ScrollReactHive OriginalNo packages, just React and Tailwind CSS
Card DealScroll

How It Works

Each card is a chain of 24 hinged strips, each showing its slice of the card cut with clip-path, so the card can bend. The section is pinned; scroll progress gives each card its own window, one after another, and in it the card follows a curve from below the corner on its side of the grid (lower left for the left column, lower right for the right) almost straight up into its cell. It starts nearly edge on and turned (clockwise on the left, the other way on the right), curled on its inner edge, and all of that unwinds a little more slowly than it rises. A second copy of the face, coloured with the light, shows through a soft round mask anchored at the top right corner: it grows to fill the card as it rises and shrinks to drain it as the next card lands, like a soft card fill. Behind the grid, a radial light's strength follows how many cards are down and its centre eases toward the pointer.

Use It

Install it with shadcn, or copy the file into your components folder, then use it like this. Change a setting in the demo and the example picks it up. Works with Next.js (App Router) and any React 19 project on Tailwind CSS v4.

npx shadcn@latest add @reacthive/card-deal
Example
<CardDeal cards={[{ content: <Service />, label: "Design" }]} columns={2} tint="#0a45ff">
  <div className="absolute inset-0 bg-[#040a26]" />
</CardDeal>
  • cards are { content, label }. content fills a card, so size type with container units (cqw) and it reads the same at any size. It is drawn twice, plain and filled with the light, so colour it with var(--deal-bg), var(--deal-ink) and var(--deal-mute) (with your own fallbacks, like bg-[var(--deal-bg,#fff)]); the filled copy gets the light behind white type. label is what screen readers hear.
  • tint is the light: a card fills with it from the top right corner as it rises and drains back with a soft curved edge after it lands, and it glows behind the grid. tintInk is the type colour while filled. curl is how far a card bends in flight.
  • columns sets the grid on wider screens; phones get one card per row, and when that's taller than the screen the section grows and the stack scrolls up as the cards land. aspect, radius, length, headroom and footroom do what they say.
  • children are layers in the pinned screen, under the cards: a background, a heading. They can read --p (scroll progress), --form (how many cards have landed, 0 to 1) and --pan (a phone's scroll, in pixels).
  • In flight every card is drawn twice over in 24 strips so the curl is smooth; once flat it swaps to a single face. Keep the markup light. No packages: CSS 3D and one requestAnimationFrame loop. With reduced motion the cards sit in the grid.

Card Deal, Answered.

Free to use, what it needs and where it came from.

Your Next Site Starts with a Live Demo.

Click around first. What you see is exactly what you download.

Start a Project

Tell us what you're making. A few lines is plenty; we'll ask the rest on a call.

What do you need?
Rough budget (optional)

Or email projects@reacthive.dev