Dokumentation (english)
Components: Shadcn UI

Card

Understand the design system and contribute to it

Component preview

The live preview for UI components is handled by components/atoms/codedocs/ComponentPreview.tsx. Use it directly inside MDX whenever you want a playground-style embed. Provide componentProps to set default values and propOptions to surface toggle-able props next to the preview.

Preview
Team workspace
Invite collaborators to build with you.
You can add up to 25 members to this workspace. Billing is handled per seat.
Usage
Monthly automation minutes
18,421

+12% vs last month

Prop reference

Auto-generated from the component source

Card

  • className

React.ComponentProps<"div">

CardAction

  • className

React.ComponentProps<"div">

CardContent

  • className

React.ComponentProps<"div">

CardDescription

  • className

React.ComponentProps<"div">

CardFooter

  • className

React.ComponentProps<"div">

CardHeader

  • className

React.ComponentProps<"div">

CardTitle

  • className

React.ComponentProps<"div">

Code
// owner: Sona
"use client";

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

export default function CardExample() {
  return (
    <div className="grid gap-6 md:grid-cols-2">
      <Card>
        <CardHeader>
          <CardTitle>Team workspace</CardTitle>
          <CardDescription>
            Invite collaborators to build with you.
          </CardDescription>
        </CardHeader>
        <CardContent className="text-sm text-muted-foreground">
          You can add up to 25 members to this workspace. Billing is handled per
          seat.
        </CardContent>
        <CardFooter>
          <Button>Invite teammates</Button>
        </CardFooter>
      </Card>
      <Card>
        <CardHeader>
          <CardTitle>Usage</CardTitle>
          <CardDescription>Monthly automation minutes</CardDescription>
        </CardHeader>
        <CardContent>
          <div className="text-4xl font-semibold">18,421</div>
          <p className="text-xs text-muted-foreground">+12% vs last month</p>
        </CardContent>
        <CardFooter>
          <Button variant="ghost">View details</Button>
        </CardFooter>
      </Card>
    </div>
  );
}

On this page


Command Palette

Search for a command to run...

Schnellzugriffe
STRG + KSuche
STRG + DNachtmodus / Tagmodus
STRG + LSprache ändern

Software-Details
Kompiliert vor 15 Tagen
Release: v4.0.0-production
Buildnummer: master@6fbd7b5
Historie: 13 Items