Back to Playbook

Containers

Use centered containers with max-widths to keep content readable and focused on ultra-wide screens.

Container Playground

Resize the viewport to see how different container types behave.

Why it matters

Containers constrain the width of your content, ensuring that lines of text don't become too long to read comfortably and that the layout doesn't stretch awkwardly on large monitors. They provide a consistent frame for your design.

Container Types

Fixed

A container with a specific max-width (e.g., 1200px) that centers itself on larger screens.

Fluid

A container that spans 100% of the viewport width, often used for full-width backgrounds or hero sections.

Responsive

A container that snaps to specific max-widths at defined breakpoints (e.g., 540px, 720px, 960px).

Text Container

A narrower container (e.g., 700px) specifically for long-form text to maintain optimal line length.

Sidebar Layout

A container split into a main content area and a fixed or sticky sidebar.

Usage Checklist

  1. Center Alignment

    Always center your fixed containers horizontally on the page.

  2. Padding

    Add horizontal padding (gutters) to containers so content doesn't touch the screen edges on mobile.

  3. Max-Widths

    Define max-widths for different breakpoints to control how the layout scales.

Previous: Responsive Breakpoints Next Section: Buttons