Card
The React Card component is a container for grouping related content and actions. It helps you organize information in a clear and structured way.
You can use it to display content such as articles, user profiles, product details, or dashboard summaries. For example, a card can show a title, description, and buttons in one place.
Built with React and styled with Tailwind CSS, it includes sections like header, content, and footer to help you easily structure your layout.
TailGrids is a free and open-source collection of UI components for Tailwind CSS.
Installation
Install the component using the Tailgrids CLI.
npx @tailgrids/cli add cardAnatomy
Import the components and arrange them to build a card.
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle
} from "@/registry/core/card";
export function CardDemo() {
return (
<Card className="w-87.5">
<CardHeader>
<CardTitle>Create project</CardTitle>
<CardDescription>Deploy your new project in one-click.</CardDescription>
</CardHeader>
<CardContent>
<form>{/* Your form or content here */}</form>
</CardContent>
<CardFooter className="flex justify-between">
<button>Cancel</button>
<button>Deploy</button>
</CardFooter>
</Card>
);
}Examples
Mobile Responsiveness
The card component is designed to be responsive in any devices.
Horizontal Card
Display card content in a horizontal layout, useful for list items or featured content.
Barry Geraghty’s blog Vango runs unchained up in trip.
William Hill ambassador Barry Geraghty previews Saturday’s races at Uttoxeter, Kempton, and Thurles.


Barry Geraghty’s blog Vango runs unchained up in trip.
William Hill ambassador Barry Geraghty previews Saturday’s races at Uttoxeter, Kempton, and Thurles.
Article Card
A card layout optimized for blog posts or news articles, featuring an image, title, excerpt, and metadata.
Ahmed Tusar
Tech Enthusiast
The Sun Also Rises by Ernest Hemingway
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
List Style
Use cards to create list-style interfaces, perfect for settings pages or item listings.
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
With Avatar
Combine cards with avatars to display user profiles or team members.

Mosharof Chowdhury
Enterpreneur
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
With Image
Use images as the primary visual element in your cards.

Everything you need to know About UI/UX Design.
With Badge
Add badges to cards to highlight status, tags, or categories.

Behind the Scenes of Popular Cartoons
API Reference
The Card component and its subcomponents are built on top of the standard HTML div element and accept all standard props.
Card
Displays a card with header, content, and footer.
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Additional CSS classes to apply to the card container |
CardHeader
The header of the card.
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Additional CSS classes to apply to the header |
CardTitle
The title of the card.
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Additional CSS classes to apply to the title |
CardDescription
The description of the card.
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Additional CSS classes to apply to the description |
CardAction
The action area of the card, usually for buttons or links in the header.
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Additional CSS classes to apply to the action area |
CardContent
The main content of the card.
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Additional CSS classes to apply to the content area |
CardFooter
The footer of the card.
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Additional CSS classes to apply to the footer |
NOTE: The CardTitle, CardDescription, and CardAction components are designed to be used within the CardHeader component.
Accessibility
- Semantic structure: Use
CardTitlefor headings and structure content clearly so users can understand what the card represents. - Content grouping: The card groups related content and actions together, making it easier to scan and understand.
- Keyboard support: Ensure any interactive elements inside the card (such as buttons or links in
CardFooterorCardContent) are accessible using the keyboard. - Screen reader support: Provide clear text for titles, descriptions, and actions so screen readers can describe the card content properly.
