Skip to content

Grid

Arranges its children in one or two equal columns.

Use it for: Tiles of the same kind, such as stats or shortcuts.

  • CategoryLayout
  • ChildrenAny number
  • DataNone
  • ActionNone
Prop Required Accepts What it does
columns Yes whole number, 1 to 2 Number of columns.

Every component also accepts id (required, unique on its screen), and the optional preset and style described in Style options.

{
"id": "stats",
"type": "Grid",
"props": {
"columns": 2
},
"style": {
"gap": "$spacing.md"
},
"children": [
{
"id": "stat-one",
"type": "Card",
"props": {},
"preset": "panel",
"children": [
{
"id": "stat-one-text",
"type": "Text",
"props": {
"text": "12 workouts"
}
}
]
},
{
"id": "stat-two",
"type": "Card",
"props": {},
"preset": "panel",
"children": [
{
"id": "stat-two-text",
"type": "Text",
"props": {
"text": "340 minutes"
}
}
]
}
]
}