Layout
Container
Constrains content width and centers it with responsive horizontal padding.
margin
Container
max-w: 1200pxpx-4→sm:px-6→md:px-8
margin
Props
| Prop | Type | Default |
|---|---|---|
maxWidth | number | 1200 |
useSafeArea | boolean | true |
className | string | — |
children | ReactNode | — |
Usage
// Wrap your screen content
import { Container } from '@/components/ui/container';
// Basic usage
<Container>
<Header />
<ScrollView>
<Content />
</ScrollView>
</Container>
// Custom max width, no safe area
<Container maxWidth={960} useSafeArea={false}>
<NarrowContent />
</Container>