Card

Shadcn compatible card with header, title, description, action, content and footer slots, a compact size and edge to edge images. Built for Tailwind v4.

src/registry/ui/card.tsx/r/card.json

Installation#

bash
npx shadcn@latest add @minidev/card

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/card.json

Usage#

tsx
import { Card } from "@/components/ui/card"

export function Example() {
  return (
    <Card key={n}><CardHeader><CardTitle>Slide {n}</CardTitle></CardHeader><CardContent className="text-sm text-fg-muted">Carousel card content.</CardContent></Card>
  )
}

API reference#

Card props
PropTypeDefault
size"default" | "sm""default"

Also accepts every prop of <div>, passed through to the root element.

Examples#

All layout components

Learn more