Skip to main content
Clever Ops

Stack Shuffle Card

A fanned deck of three to five cards where explicit controls shuffle the next card forward on a spring arc, inert back faces, arrow-key support, and polite position announcements.

Preview & code

Loading Stack Shuffle Card preview

Installation

pnpm dlx shadcn@latest add @cleverui/card-stack-shuffle

Requires the @cleverui registry in your components.json, a one-off, two-line setup.

Usage

tsx
import { CardStackShuffle } from '@/components/ui/card-stack-shuffle'
Exampletsx
import { CardStackShuffle } from '@/components/ui/card-stack-shuffle'

export default function CardStackShuffleDemo() {
  return (
    <div className="mx-auto flex min-h-[520px] max-w-lg items-center px-4 py-16 sm:px-6">
      <CardStackShuffle
        ariaLabel="Release notes deck"
        cards={[
          {
            kicker: 'Ops note',
            title: 'Warm failover is now default',
            body: 'Standby nodes pre-warm connection pools so cutover stays under two seconds on the Harbor fleet.',
            meta: 'Shipped · v2.14',
          },
          {
            kicker: 'Billing',
            title: 'Usage meters landed daily',
            body: 'Meter exports write at 06:00 UTC with a signed checksum. Finance can reconcile without a console hop.',
            meta: 'GA · all workspaces',
          },
          {
            kicker: 'Security',
            title: 'Session keys rotate every 12h',
            body: 'Short-lived tokens replace the 7-day refresh path. Idle sessions expire quietly with a re-auth prompt.',
            meta: 'Policy · enforced',
          },
          {
            kicker: 'DX',
            title: 'CLI ships structured traces',
            body: 'Every deploy prints a single JSON line with duration, region, and rollback handle for the on-call feed.',
            meta: 'CLI · 1.9.0',
          },
        ]}
        className="w-full"
      />
    </div>
  )
}

API reference

CardStackShuffle accepts the following props.

PropTypeDefaultDescription
cards*CardStackItem[]3–5 cards; every face should read as real product copy
ariaLabelstring'Card deck'accessible name for the deck group
initialIndexnumber0index of the card in front on first render

…plus everything from React.HTMLAttributes<HTMLElement>: className, event handlers, aria attributes and the rest pass straight through.

Referenced types

Typestsx
export interface CardStackItem {
  kicker?: string
  title: string
  body: string
  meta?: string
}

Frequently asked questions

How do I install the Stack Shuffle Card component?

Register the @cleverui registry in your components.json ("@cleverui": "https://cleverops.com.au/r/{name}.json"), then run `npx shadcn@latest add @cleverui/card-stack-shuffle`. The shadcn CLI copies the source into your project, you own the code from that point. You can also copy the source directly from this page.

What dependencies does Stack Shuffle Card require?

Stack Shuffle Card uses motion and lucide-react on top of React and Tailwind CSS. You don't need to install them manually, the shadcn CLI resolves and installs npm dependencies automatically when you add the component.

Can I theme Stack Shuffle Card to match my brand?

Yes. The component is styled entirely with Tailwind utilities over standard design tokens (primary, background, muted, border), so it inherits your existing shadcn/ui theme automatically. Change your CSS variables and the component follows, no source edits needed for palette, radius, or fonts.

Want this built for you?

CleverUI is built by the Clever Ops web team. If you'd rather ship a hand-coded, fast, custom website than assemble one, we build them for Australian businesses every week.

Explore web development services