Back to Components
Cards

Card

Flexible card container with header, content, and footer sections.

PropsUsage ExampleVariations

Card Title

Card description with supporting text.

This card adapts its styling based on the selected preset.

Elevated Card

With enhanced shadow.

Use elevated for emphasis.

Dependencies

  • clsx
  • tailwind-merge

Files

  • components/ui/card.tsx

Installation

Using shadcn CLI

npx shadcn add card --url https://ui.hampton.io

Manual installation

Copy the component file to your project and install dependencies:

npm install clsx tailwind-merge

Related Cards Components