Team Grid Cards
A responsive card grid of people with gradient-initials avatars, names and roles.
3 frameworksBeginner
A horizontally scrolling, snap-aligned strip of team cards with no JavaScript.
<section class="mx-auto w-full max-w-6xl px-4 py-12 sm:px-6 sm:py-16">
<h2 class="text-2xl font-bold tracking-tight text-gray-900 sm:text-3xl dark:text-gray-100">Meet the team</h2>
<!--
A native scroll-snap strip: no JS. tabindex="0" + a region label make the
overflow keyboard-focusable and announced, which a bare scroll box is not.
-->
<div role="region" aria-label="Team members" tabindex="0" class="mt-8 -mx-4 flex snap-x snap-mandatory gap-4 overflow-x-auto px-4 pb-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 focus-visible:ring-offset-2 focus-visible:ring-offset-white sm:mx-0 sm:px-0 dark:focus-visible:ring-blue-400 dark:focus-visible:ring-offset-gray-900">
<article class="w-56 shrink-0 snap-start rounded-2xl border border-gray-200 bg-white p-6 text-center dark:border-gray-800 dark:bg-gray-900">
<span aria-hidden="true" class="inline-flex h-16 w-16 items-center justify-center rounded-full bg-gradient-to-br from-blue-500 to-indigo-600 text-lg font-semibold text-white">PR</span>
<h3 class="mt-4 text-base font-semibold text-gray-900 dark:text-gray-100">Priya Raman</h3>
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">Co-founder, strategy</p>
</article>
<article class="w-56 shrink-0 snap-start rounded-2xl border border-gray-200 bg-white p-6 text-center dark:border-gray-800 dark:bg-gray-900">
<span aria-hidden="true" class="inline-flex h-16 w-16 items-center justify-center rounded-full bg-gradient-to-br from-emerald-500 to-teal-600 text-lg font-semibold text-white">TA</span>
<h3 class="mt-4 text-base font-semibold text-gray-900 dark:text-gray-100">Tom Ashcroft</h3>
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">Head of engineering</p>
</article>
</div>
</section>| Prop | Type | Default | Description |
|---|---|---|---|
title | string | 'Meet the team' | Heading text for the card. |
membersrequired | TeamMember[] | - | The people shown in the grid. |
className | string | - | Additional classes merged onto the root element. |
A native CSS scroll-snap strip - no JS, no dependency. The scroll container is a labelled `region` with `tabindex="0"` so keyboard users can focus and arrow through it, which a bare overflow box cannot do. Drive the cards with `members`.