Skip to content

Stacked cards shuffle

Swipeable team card deck beside a full roster.

Usage

Usage
import { TeamDeck } from '@/components/blocks/team-04'


<TeamDeck />


// Bring your own people
<TeamDeck
  heading="Say hello to the team"
  autoAdvance={7000}
  members={[
    {
      name: 'Jane Doe',
      role: 'Founder',
      line: 'Started the company at her kitchen table.',
      photo: { src: 'https://example.com/jane.jpg', alt: 'Jane Doe smiling' },
      socials: [{ label: 'Website', href: 'https://example.com/janedoe' }],
    },
    {
      name: 'Sam Lee',
      role: 'Engineer',
      line: 'Keeps the lights on and the builds fast.',
      photo: { src: 'https://example.com/sam.jpg', alt: 'Sam Lee in a grey jumper' },
    },
  ]}
  onChange={(index, member) => console.log(index, member.name)}
/>

Install

pnpm dlx shadcn@latest add @pastaui-pro/team-04

Source

Props

Stacked cards shuffle props
PropTypeDefaultDescription
eyebrowstring= 'The people'Small label above the heading.
headingstring= 'Meet the crew behind every release'Section heading, rendered as an h2 and used as the carousel label.
descriptionstring= Sample descriptionMuted supporting text under the heading.
membersTeamDeckMember[]= Eight sample peopleEach member takes a name, role, a one-line line, a photo ({ src, alt }) and optional socials ({ label, href }[]). Names must be unique.
autoAdvancenumber | false= 5000Milliseconds each card stays on top before the deck shuffles, or false to turn auto-advance off. Always off under reduced motion.
initialIndexnumber= 0Which member starts on top.
onChange(index: number, member: TeamDeckMember) => void= undefinedCalled whenever a new card comes to the top.
classNamestring= undefinedExtra classes for the section.
styleCSSProperties= —Inline styles, handy for overriding the --pp-* theme variables.