Vanilla Breeze

layout-center

Horizontally centered content container with configurable max-width. Essential for constraining content width on wide screens.

Attributes

Attribute Values Default Description
data-layout-max narrow, normal, wide, prose normal Max inline size: --content-narrow / --content-normal / --content-wide, or prose (65ch).
data-layout-intrinsic (boolean) Center narrower-than-max content intrinsically (flex column, align center).
data-layout-text (boolean) Center the text as well.
data-layout-gutter none, s, l m Inline padding: none, s or l (default m).
data-layout-gap (bare), none, 3xs, 2xs, xs, s, m, l, xl, 2xl, 3xl Become a flex column with this gap between children, on the shared size scale.

Max Width Variants

The data-layout-max attribute controls the maximum width of the container.

Intrinsic Centering

The data-layout-intrinsic attribute centers content that is narrower than the max-width.

Text Centering

The data-layout-text attribute adds text-align: center for centered text content.

Gutter Variants

The data-layout-gutter attribute controls horizontal padding (useful for nested centers).

Usage Examples

Page Layout

Hero Section

Article Content

Form Container

Related