Component
Container
Constrain page content with responsive max widths, horizontal padding tokens, and semantic element overrides.
Interactive preview
Usage
Import the component entry and start with its smallest complete example.
Import
import { Container } from "@chitrank2050/monoline-ui/container"Basic usage
<Container size="md" as="section">
<h2>Project highlights</h2>
<p>Constrained content with responsive inline padding.</p>
</Container>Usage guidance
Choose the component for its interaction model and semantics before customizing its appearance.
Container keeps a page or major section at a consistent responsive width.
You are arranging a local flex or grid layout that does not need a maximum page width.
Container is a div by default and accepts as for landmarks such as main or section, so choose the semantic element that matches the enclosed content.
This component can render without adding a Monoline client boundary when its children and props are serializable.
API reference
Props, slots, and callbacks available on this component.
Design tokens
Theme variables this component reads for color, spacing, and motion.
Implementation
The source used by the example above, including any state it needs.
import { Container } from "@chitrank2050/monoline-ui/container"
export function PageSection() {
return (
<Container size="lg" as="section">
<h2>Project highlights</h2>
<p>Use Container for page sections, docs content, and marketing blocks.</p>
</Container>
)
}Related documentation
Compare related components or review the package and theme setup.