Component guideEditable source

Card

A bordered container with composable header, body, actions, and footer.

Original component docs
On this page4 sectionsBack to top

Use Card to group related information and actions. It supplies visual structure, not navigation, selection, or heading semantics. Put real buttons and links inside it rather than making a generic container clickable.

Live preview
Loading preview...

#Installation

Complete the base setup, then install or copy the source:

npx shadcn@latest add https://neobrutal-ui.andongmin.com/r/card.json

The login preview additionally uses Button, Input, and Label. Install them before copying the Code. Its feedback is local demo state; it does not authenticate an account or send email.

npx shadcn@latest add https://neobrutal-ui.andongmin.com/r/button.json https://neobrutal-ui.andongmin.com/r/input.json https://neobrutal-ui.andongmin.com/r/label.json

#Usage

import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";

export default function ProjectCard() {
  return (
    <Card className="w-full max-w-sm">
      <CardHeader>
        <CardTitle>
          <h2>Design system</h2>
        </CardTitle>
        <CardDescription>Shared components for the product team.</CardDescription>
      </CardHeader>
      <CardContent>
        <p>12 components are ready for review.</p>
      </CardContent>
    </Card>
  );
}

#API reference

Prop / partPurposeDefault
CardRoot surface and shadowdiv
CardHeaderTitle, description, and optional action layoutdiv
CardTitle / CardDescriptionText styling; not heading elementsdiv
CardActionAction beside header contentdiv
CardContent / CardFooterMain content and action regiondiv
classNameWidth and layout on each part—

#Accessibility

Put a real heading inside CardTitle when the card starts a section, using the level appropriate to the page. Name icon-only actions. Avoid nested interactive elements when adding a card-wide link. A collection of cards may use a list outside the component.