structyl

Container

stable

Centers content with responsive max-widths.

Basic usage

Container

Examples

Responsive sizes

Pick the max-width that matches the density of the page area.

size=sm
size=md
size=lg

Full-width sections

Use size="full" for app surfaces that should stretch edge to edge.

Full-width app section

Widths and gutters

maxWidth mirrors the MUI naming, while size remains the Structyl alias.

maxWidth=false disableGutters

Features

  • Responsive horizontal padding.
  • Preset max-width sizes.

Installation

bash
pnpm dlx structyl add container

API Reference

Container

Responsive centered page container.

PropTypeDefault
size'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full'

Structyl alias for maxWidth.

'lg'
maxWidthfalse | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full'

Maximum container width. Pass false for full width.

'lg'
disableGuttersboolean

Remove horizontal page padding.

false
fixedboolean

Use fixed breakpoint widths.

false
classNamestring

Additional Tailwind classes merged with the component defaults.

Container | structyl