Axon 911 Frontend DocsAxon 911 Frontend Docs
Axon 911 Frontend Docs
    Loading navigation…
U
User
Switch to light mode
  1. Primitives
  2. Grid
  3. API and Development

Grid

API and Development

View SourceOpens in a new tabSubmit IssueOpens in a new tab
Grid is a layout host for tokenized column and row tracks. It does not carry paint—put background, border, and content on Box (or other primitives) inside cells. Use template={GridTemplate.*} for product layouts instead of consumer grid-template-columns. Pair with GridItem when a child spans multiple tracks. For one-dimensional flex inside a cell (scroll hosts, toolbars), use Box / FlexBox item (FlexItem, alignSelf).
Key props
NameTypeDefaultDescription
templateGridTemplate—Column track template (equal, ratio, sidebar, queue metrics, auto-fill).
rowsGridRows—Row template.
flowGridFlowrowAuto-placement flow.
alignGridAlign—Align items.
justifyGridJustify—Justify content.
gapGridGap—Gap spacing scale.
collapseBelowGridCollapseBelow—Single column below a container width breakpoint.
displayGridDisplaygridgrid or inline-grid.
See GridProps and GridItem in @prepared911/ui for the full surface.
GridTemplate
MemberTracks
EqualHalvesrepeat(2, minmax(0, 1fr))
EqualThirdsrepeat(3, minmax(0, 1fr))
EqualQuartersrepeat(4, minmax(0, 1fr))
EqualSixthsrepeat(6, minmax(0, 1fr))
EqualTwelfthsrepeat(12, minmax(0, 1fr))
EqualTenthsrepeat(10, minmax(0, 1fr))
TwoOneminmax(0, 2fr) minmax(0, 1fr)
ThreeOneminmax(0, 3fr) minmax(0, 1fr)
QueueMetricsStandardvar(--layout-queue-metrics-standard) minmax(0, 1fr) minmax(0, 1fr)
QueueMetricsEctvar(--layout-queue-metrics-ect) minmax(0, 1fr) minmax(0, 1fr)
SidebarStartMainvar(--layout-panel-fixed) minmax(0, 1fr)
MainSidebarEndminmax(0, 1fr) var(--layout-panel-fixed)
AutoFillMinItemrepeat(auto-fill, minmax(var(--layout-grid-auto-fill-min), 1fr))
Queue metric tokens resolve to 14.4375rem (standard) and 21.0625rem (ECT) at a 16px root.
Flex item vs Grid
PatternUse
Column ratios (2:1, 3:1, ten equal tracks)Grid + GridTemplate
Fixed metric column + two flexible peers on queue boardsQueueMetricsStandard / QueueMetricsEct
Flex row with one scrollable childFlexBox + item={FlexItem.FillScroll}
Cross-axis override on one flex childalignSelf on Box / FlexBox
Before and after
The previews below mirror Grid stories in Storybook.
Default
Columns
Rows
Grid flow
Alignment
Masonry layout
Previous
Grid / Usage
Next
Grid / Accessibility
On this page
Key props
GridTemplate
Flex item vs Grid
Before and after
Default
Columns
Rows
Grid flow
Alignment
Masonry layout