Container

Centers content at a readable maximum width with consistent side gutters.

Status: stable. Category: Layout.

import { Container } from '@glyphui/ui'

Exports: Container, containerStyles.

Container props

PropTypeDefaultDescription
asChildboolean
size"sm" | "md" | "lg" | "xl" | "full"

Example: Sizes

import { Container } from '@glyphui/ui'

export default function Example() {
  return (
    <div className="grid gap-2">
      {(['sm', 'md', 'lg', 'xl'] as const).map((size) => (
        <Container key={size} size={size}>
          <div className="rounded-md border border-dashed border-border-strong bg-muted px-3 py-2 font-mono text-caption text-muted-foreground">
            size="{size}"
          </div>
        </Container>
      ))}
    </div>
  )
}

Live page: https://glyphui.xyz/components/container