Components/Layout/Container

Container

Layout

Max-width wrapper with consistent horizontal padding.

Centers content with a max-width. Size tokens map to fixed widths: xs=540px, sm=720px, md=960px, lg=1200px, xl=1320px, fluid=unconstrained.

Usage

import { Container } from "nosible-ux"

export default function Example() {
  return (
    <Container size="lg">
      Page content
    </Container>
  )
}

Examples

Size comparison

XS — 540px
MD — 960px
LG — 1200px

Props

Name TypeDefaultDescription
asChild
boolean | undefinedWhen true, merges Container styles onto the child element instead of a wrapper div.
px
number | undefinedHorizontal padding in pixels. Default: 20 (base grid).
size
"xs" | "sm" | "md" | "lg" | "xl" | "fluid" | undefinedMax-width breakpoint for the container. xs=540 · sm=720 · md=960 · lg=1140 · xl=1320 · fluid=no limit. Default: 'lg'.