How-To Guides · Screens, dashboards and reports
The Grid Container layout provides a powerful way to create structured, responsive dashboard layouts in Fuuz. Unlike the default Flex layout which arranges items in rows or columns, the Grid layout allows you to define a precise two-dimensional matrix of cells where components can be positioned and sized exactly where you need them.
This article explains how to:
Note: Demo Available: A working Grid Container Demo screen is available for import (
Grid_Container_Demo_0_0_1.json). Import this screen into your application to experiment with the grid properties interactively.
| Aspect | Flex Layout | Grid Layout |
|---|---|---|
| Dimension | One-dimensional (row OR column) | Two-dimensional (rows AND columns) |
| Item Placement | Items flow sequentially | Items placed in specific cells |
| Sizing | Items sized by content or flex-grow | Cells have uniform size, items can span |
| Best For | Toolbars, menus, form rows | Dashboards, tile layouts, data displays |
layout: "grid" that defines the overall grid structure| Property | Type | Description |
|---|---|---|
layout |
String | Set to "grid" to enable grid layout |
columns |
Number | Number of columns in the grid (e.g., 5) |
rows |
Number | Number of rows in the grid (e.g., 5) |
justifyItems |
String | Horizontal alignment: "start", "center", "end", "stretch" |
Items placed inside a Grid Container automatically flow into the grid cells from left to right, top to bottom. Each child component occupies one cell by default.
When you need a component to occupy more than one cell (span multiple columns or rows), use the Grid Cell component.
| Property | Type | Description |
|---|---|---|
colSpan |
Number | Number of columns to span (default: 1) |
rowSpan |
Number | Number of rows to span (default: 1) |
For complex layouts, you can nest grids inside each other. Place a Container with layout: "grid" inside a Grid Cell to create a sub-grid.
Grid properties can be made dynamic using JSONata transforms. This allows the grid structure to change based on user input, screen size, data conditions, or other factors.
The Grid Container Demo (Grid_Container_Demo_0_0_1.json) provides an interactive example. Import via Screen Designer → Import. The demo includes form controls to dynamically adjust columns, rows, colSpan, and rowSpan in real-time.
Note: The original KB article includes a downloadable attachment (
GridContainerDemo001.json). Download it from the original article.
__fallbackValue| Issue | Possible Cause | Resolution |
|---|---|---|
| Items stacking vertically | Layout not set to "grid" | Verify Container has layout: "grid" |
| Grid shows one column only | Columns property not set | Set columns to a positive integer (e.g., 5) |
| Grid Cell not spanning | Using Container instead of Grid Cell | Use the Grid Cell component for spanning |
| Dynamic values not working | Transform syntax error | Verify JSONata syntax and component references |
| Version | Date | Editor | Description |
|---|---|---|---|
| 1.0 | 2025-01-25 | Fuuz Documentation Team | Initial release with Grid Container Demo v0.0.1 reference |