Layout

Container

Page-level wrapper that caps content width and applies consistent lateral padding from tokens. Polymorphic via the as prop.

Examples

Constrained content
Loading preview
<Container maxWidth="sm">Centered, width-capped content</Container>

API

PropTypeDefaultDescription
maxWidth'sm' | 'md' | 'lg' | 'xl' | 'full'lgMax content width; full removes the constraint.
padding'none' | 'sm' | 'md' | 'lg'mdLateral padding.
centeredbooleantrueCenter horizontally within the parent.

Guidelines

Do

  • Use one Container per page region to keep line lengths readable.

Avoid

  • Do not nest Containers; use Stack or Grid inside instead.

Import from @hub/ds-components. Interactive playground: Storybook. Figma Code Connect node 299-130.