- Home
- Components
- Card
# Card
Displays a card with header, content, and footer.
## Props
This component group provides styled containers. All parts accept standard div props.
- Card: root container with size variants (sm, md, lg, xl) for padding
- CardHeader: header row with optional actions, supports size variants for gap spacing
- CardTitle: title text
- CardDescription: subdued description text
- CardAction: right-aligned action area in header
- CardContent: main content area
- CardFooter: footer area (flex container)
## Types
```
// Card component with size variants
interface CardProps extends ComponentProps<"div"> {
size?: "sm" | "md" | "lg" | "xl";
}
// CardHeader also supports size variants for gap spacing
interface CardHeaderProps extends ComponentProps<"div"> {
size?: "sm" | "md" | "lg" | "xl";
}
// All other Card components extend ComponentProps<"div">
interface CardTitleProps extends ComponentProps<"div"> {}
interface CardDescriptionProps extends ComponentProps<"div"> {}
interface CardActionProps extends ComponentProps<"div"> {}
interface CardContentProps extends ComponentProps<"div"> {}
interface CardFooterProps extends ComponentProps<"div"> {}
```
```
Card Title
CardContent...
CardContent...
CardContent...
CardContent...
CardContent...
```
## Sizes
The Card component supports different padding sizes, and CardHeader adjusts gap spacing accordingly:
```
// Small card with reduced padding and gap spacing
Small Card
Compact content with smaller padding and gap.
// Large card with increased padding and gap spacing (default)
Large Card
More spacious content with larger padding and gap.
```
## Login Form Example
```
import { Button } from "@vuer-ai/vuer-uikit"
import {
Card,
CardAction,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "@vuer-ai/vuer-uikit"
import { Input, Label } from "@vuer-ai/vuer-uikit"
Login to your account
Enter your email below to login to your account
```
## Examples with Icons and Buttons
```
import { Settings, User, Bell, Plus, ChevronRight } from 'lucide-react';