# Container
Safe area container component with flexible padding and background color options.
## Features
- ✅ Safe area handling (respects notch, status bar, etc.)
- ✅ Optional padding
- ✅ Custom background color
- ✅ NativeWind/Tailwind support
- ✅ TypeScript support
## Installation
```bash
npx @memoro/ui add container
```
## Usage
### Basic Container
```tsx
import { Container } from '@/components/ui/Container/Container';
Your content here
```
### Custom Background Color
```tsx
Gray background
Dark background
```
### Without Padding
```tsx
```
### Custom Padding
```tsx
Custom 16px padding
Larger 32px padding
```
### With Tailwind Classes
```tsx
Using Tailwind classes
```
### Full Example
```tsx
function MyScreen() {
return (
Screen Title
Screen content goes here
);
}
```
## Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `children` | `ReactNode` | - | Content to render inside container |
| `backgroundColor` | `string` | `'#FFFFFF'` | Background color (hex, rgb, etc.) |
| `padding` | `boolean` | `true` | Apply default padding |
| `paddingValue` | `number` | `24` | Custom padding in pixels |
| `style` | `ViewStyle` | - | Additional styles |
| `className` | `string` | `''` | CSS class names (NativeWind) |
## Default Behavior
- **Padding:** 24px (Tailwind `p-6`)
- **Background:** White (`#FFFFFF`)
- **Safe Area:** Automatically handled for all edges
## With Theme Integration
```tsx
import { useTheme } from '~/contexts/ThemeContext';
import { Container } from '@/components/ui/Container';
function ThemedScreen() {
const { theme } = useTheme();
return (
Themed content
);
}
```
## Common Patterns
### Full-Width Images
```tsx
Image Title
```
### Form Layout
```tsx
Login
```
### Scrollable Content
```tsx
{/* Content */}
```
## Dependencies
- `react-native-safe-area-context`
## Notes
- Uses `SafeAreaView` from `react-native-safe-area-context`
- Automatically applies `flex: 1` to fill screen
- Padding defaults to Tailwind's `p-6` (24px)
- Safe area is respected on all edges (top, bottom, left, right)
- Works with both light and dark backgrounds