Skip to content
Design System
  • Documentation
  • Prototypes
Branding
  • Voice & tone
  • Logo
  • Farben
  • Typographie
  • Visuelle Elemente
Foundations
  • Usage
  • Global styles
  • Themes
  • Spacing
  • Viewports
  • Colors
  • Typography
  • Core utilities
Layouts
  • Usage
  • Aspect ratio
  • Auto grid
  • Content grid
  • Flex group
  • Flow
  • Multicol
  • Pile
  • Reel
  • Region
  • Repel
  • Sidebar
  • Switcher
  • Wrapper
Patterns
  • Accordion
  • Avatar
  • Avatar Group
  • Book pile
  • Brand shapes
  • Button
  • Calendar Date
  • Callout
  • Card
  • Context Switcher
  • Figure
  • Forms
  • Hero
  • Icon
  • Icon link
  • Image Bento
  • Image Grid
  • List Icon
  • Marquee
  • Modal
  • More Link
  • Pagination
  • Pill
  • Promo Card
  • Prose
  • Section Divider
  • Section Heading
  • Section Illustration
  • Show More
  • Slideout
  • Submenu bar
  • Table
  • Tabs

Auto Grid

The auto-grid is a flexible layout that will create an auto-fill grid with configurable grid item sizes.

.auto-grid is a CSS grid that fills the available space with grid items, provided there is space for the defined --auto-grid-min-size.

Configuration #

PropertyDefault valueDescription
--guttervar(--spacing-m)Sets the horizontal gap between grid cells. It also sets the vertical gap if --gutter-vertical is not defined. The grid gap can be overwritten using the --gutter utility.
--gutter-verticalvar(--gutter)Specifically sets the vertical gap between rows of cells. If not set, it falls back to the value of --gutter
--auto-grid-min-size20remHow large each item should be, as a minimum
--auto-grid-max-columnsinfinitySets the maximum number of columns in the grid.
--grid-placementauto-fillSet either auto-fit or auto-fill to change how empty grid tracks are handled

Exceptions #

ExceptionDescription
.auto-grid[data-auto-grid-fill]Changes the grid fill mode from `auto-fit` to `auto-fill`.
.auto-grid[data-auto-grid-max="2"]Limits the maximum number of items in a column to two.
.auto-grid[data-auto-grid-max="3"]Limits the maximum number of items in a column to three.

Examples #

View full screen
Theme