Skip to content
Theme

Layout and density

Page widths, the viewport breakpoints and container sizes, and how tightly controls are packed.

Widths

TokenValueUse
layout.page64remThe width of a page's content.
layout.narrow40remA single column of reading.
layout.wide80remA wide working surface: tables, dashboards.
layout.gutterclamp(1rem, 4vw, 2rem)The space between the content and the viewport edge.
layout.sidebar15remThe width of a sidebar: the app shell's, and the Sidebar layout's.
layout.rail3.5remThe sidebar collapsed to a rail of icons.
layout.topbar3remAn app page's top bar.
layout.header4.25remThe site header from the md breakpoint up.
layout.headerCompact3.25remThe site header below the md breakpoint.
layout.panel22remA record page's attribute panel.

Breakpoints and containers

Compiled to StyleX constants (breakpoint.md, container.sm) over ranges that never overlap: overlapping min-width conditions in compiled styles can apply out of order, so a style meant from md up names md and lg. Components prefer container queries, so they respond to the space they are given.

TokenValueUse
breakpoint.base@media (width < 40rem)
breakpoint.sm@media (40rem <= width < 64rem)
breakpoint.md@media (64rem <= width < 80rem)
breakpoint.lg@media (width >= 80rem)
TokenValueUse
container.base@container (width < 24rem)
container.sm@container (24rem <= width < 40rem)
container.md@container (40rem <= width < 64rem)
container.lg@container (width >= 64rem)

Density

Comfortable by default; the compact theme (Theme density="compact") tightens controls and table rows.

TokenValueUse
density.control2.25remHeight of a control.
density.controlInline0.75remInline padding inside a control.
density.row0.5remBlock padding of a table row or list item.
density.gap0.75remThe gap between related controls.