# Card
Compound components for building flexible card layouts. Cards provide a
structured container with header, title, description, content, and footer
sections.
## Installation
```bash
deno run -A jsr:@lockness/ui add card
```
## Usage
```tsx
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '@lockness/ui/components'
User ProfileManage your account settings
Your content here
```
## Components
### Card
The main container component with border, rounded corners, and shadow.
```tsx
{/* Card sections go here */}
```
### CardHeader
Header section of the card. Supports optional icons with configurable
positioning.
```tsx
// Basic header
Title
// With icon on the left (default)
Design
// With icon on top
Statistics
// With icon on the right
Next Step
```
### CardTitle
Title typography for card headers.
```tsx
Dashboard
```
### CardDescription
Muted description text for additional context.
```tsx
Manage your account settings
```
### CardContent
Main content area of the card.
```tsx
Your content here
```
### CardFooter
Footer section for actions, displayed as a flex row.
```tsx
```
## Props
### CardProps
| Prop | Type | Default | Description |
| -------- | --------- | ------- | -------------------------- |
| children | `unknown` | - | Card content |
| class | `string` | - | Additional CSS class names |
| id | `string` | - | Element id attribute |
### CardHeaderProps
| Prop | Type | Default | Description |
| ------------ | ---------------------------- | -------- | ---------------------------------------- |
| children | `unknown` | - | Header content |
| class | `string` | - | Additional CSS class names |
| icon | `string` | - | Optional icon or emoji to display |
| iconPosition | `'left' \| 'top' \| 'right'` | `'left'` | Position of the icon relative to content |
| id | `string` | - | Element id attribute |
## Complete Example
```tsx
Account Settings
Update your personal information and preferences.