Layout

Container

Constrains content width and centers it with responsive horizontal padding.

margin
Container
max-w: 1200px
px-4sm:px-6md:px-8
margin

Props

PropTypeDefault
maxWidthnumber1200
useSafeAreabooleantrue
classNamestring
childrenReactNode

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>

Installation

$npx kachindo-ui add container
Profile