Studiov0.6.0
Studio/Patterns/Card Grid

Card Grid

Layout

Responsive grid of data-driven cards. Each card links to a detail page. Supports badges, metadata, and thumbnail images.

Code Example

<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
  {items.map((item) => (
    <a key={item.id} href={`/items/${item.id}`}>
      <Card className="hover:border-primary/50 transition-colors cursor-pointer">
        <CardHeader>
          <CardTitle className="text-base">{item.name}</CardTitle>
          <CardDescription>{item.description}</CardDescription>
        </CardHeader>
        <CardContent>
          <div className="flex gap-2">
            <Badge variant="secondary">{item.category}</Badge>
            <Badge variant="outline">{item.status}</Badge>
          </div>
        </CardContent>
      </Card>
    </a>
  ))}
</div>

Variants (2)

With Thumbnail

Card with top image, title, and metadata

showImage= truecolumns= 3

Compact

No image, just title and metadata badges

showImage= falsecolumns= 4

Guidelines

Do

  • Use consistent card structure across the grid
  • Show 2-3 key metadata items per card
  • Include hover state with subtle border or shadow change
  • Support loading skeletons for async data

Don't

  • Show more than 5 metadata items per card
  • Mix card layouts (some with images, some without) in one grid
  • Use cards for single-action items (use a list instead)
  • Forget pagination or virtual scroll for large datasets

Use Cases

  • Project listings (PRT projects)
  • Brand entity listing
  • Component gallery grid
  • Team member directory

Details

Category
Layout
Reference Component
CardGrid
Variants
2
Guidelines
4 dos, 4 donts
Back to all patterns