Article Title
This is an article with a narrower container for better readability. Long-form content benefits from constrained widths.
A max-width wrapper for page content with responsive padding and centering.
import { Container } from "@ninna-ui/layout"pnpm add @ninna-ui/layoutRequires @ninna-ui/core (auto-installed) + CSS setup.
Import and use the Container component.
import { Container } from "@ninna-ui/layout";
export default function Example() { return ( <Container maxWidth="lg"> <h1>Page Content</h1> <p>Your content here...</p> </Container> );}Container with max-width constraint.
This content is wrapped in a Container with max-width "lg".
Different max-width options.
Control horizontal padding.
padding=true (default)
padding=false
Center or left-align the container.
center=true (default)
center=false
Common patterns using Container.
Page Layout
Main content area
Article Layout (narrow)
This is an article with a narrower container for better readability. Long-form content benefits from constrained widths.
Complete list of props.
| Prop | Type | Default | Description |
|---|---|---|---|
maxWidth | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full' | 'none' | 'lg' | Maximum width of the container |
center | boolean | true | Center the container horizontally |
padding | boolean | true | Add horizontal padding |
className | string | - | Additional CSS classes |