# Card Container card component with shadow and optional press interaction. ## Features - ✅ Optional shadow and border - ✅ Pressable variant - ✅ Customizable padding and radius - ✅ Custom colors - ✅ Clean, minimal design ## Installation ```bash npx @memoro/ui add card ``` ## Usage ### Basic Card ```tsx import { Card } from '@/components/ui/Card'; Card Title Card content goes here ``` ### Pressable Card ```tsx console.log('Pressed')}> Tap me This card is interactive ``` ### Without Shadow ```tsx Flat card ``` ### With Border ```tsx Bordered card ``` ### Custom Styling ```tsx Custom styled card ``` ## Props | Prop | Type | Default | Description | |------|------|---------|-------------| | `children` | `ReactNode` | - | **Required** - Card content | | `onPress` | `() => void` | - | Makes card pressable | | `backgroundColor` | `string` | `'#FFFFFF'` | Background color | | `borderRadius` | `number` | `12` | Corner radius | | `padding` | `number` | `16` | Inner padding | | `shadow` | `boolean` | `true` | Show shadow | | `border` | `boolean` | `false` | Show border | | `borderColor` | `string` | `'#E5E7EB'` | Border color | | `style` | `ViewStyle` | - | Additional styles | ## Default Styling - **Background:** White (#FFFFFF) - **Border Radius:** 12px - **Padding:** 16px - **Shadow:** Yes (subtle) - **Border:** No ## Examples ### Profile Card ```tsx {user.name} {user.email} ``` ### Article Card ```tsx navigate('article', { id: article.id })}> {article.title} {article.excerpt} {article.date} ``` ### Stats Card ```tsx Total Users 24,583 +12.5% from last month ``` ### Settings Card ```tsx navigate('settings')}> Settings ``` ### Product Card ```tsx viewProduct(product.id)}> {product.name} ${product.price} {product.rating} ({product.reviews}) ``` ### Card List ```tsx {items.map(item => ( selectItem(item)}> {item.title} {item.description} ))} ``` ## Shadow Details Default shadow configuration: ```tsx { shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.1, shadowRadius: 8, elevation: 3, // Android } ``` ## Press Interaction When `onPress` is provided: - Card becomes pressable - Opacity reduces to 0.8 when pressed - Visual feedback for user interaction ## Common Patterns ### Card with Header and Footer ```tsx {/* Header */} Card Title {/* Body */} Card content {/* Footer */}