Sobeys Logo

Card Component

This file defines a modular and reusable Card component system using React. It follows a compound component pattern, which allows developers to build structured UI cards by combining smaller, purpose-built subcomponents like CardHeader, CardTitle, CardContent, etc.

It’s ideal for creating consistent UI sections like product cards, user profiles, or dashboard widgets.

Key Features

  • Composable Structure – Use only the parts you need (CardHeader, CardContent, etc.).
  • Tailwind-Ready Styling – Easily extend with utility-first classes.
  • Lightweight & Customizable – Minimal dependencies; fits any project.
  • Event Support – Card supports onClick for interactive use cases.
  • Semantic & Accessible – Encourages good HTML structure via nested components.

Desktop

Product image

Product Name

Short description of the product

This is the main content of the card. You can add anything here, like images, text, etc.

iPad

Product image

Product Name

Short description of the product

This is the main content of the card. You can add anything here, like images, text, etc.

Mobile

Product image

Product Name

Short description of the product

This is the main content of the card. You can add anything here, like images, text, etc.