Skip to content
MyAppBuilder
StableGuide

Grid columns and widths

Pages in MyAppBuilder are laid out on a 12-column grid . Every component inside a grid takes a number of columns called its span : 12 is full width, 6 is half, 4 is a third, 3 is a quarter. The span you set is the desktop width; tablet and mobile widths are calculated automatical

Pages in MyAppBuilder are laid out on a 12-column grid. Every component inside a grid takes a number of columns called its span: 12 is full width, 6 is half, 4 is a third, 3 is a quarter. The span you set is the desktop width; tablet and mobile widths are calculated automatically unless you override them.

When to use

  • Placing components side by side (cards, KPIs, a form next to a list).
  • Making a component wider or narrower without dragging pixel sizes.
  • Giving a component a different width on tablet or mobile than on desktop.

How to set the desktop width

  1. Select the component on the canvas.
  2. Open the Layout tab. The Width (desktop) picker shows 12 small cells; click the cell for the span you want. The caption shows "6 / 12 columns · Half", "4 / 12 · Third", and so on.
  3. You can also drag the resize handle on the right edge of the component on the canvas. On desktop this changes the base span; on tablet or mobile it creates an override for that breakpoint.

Automatic widths on tablet and mobile

Desktop spanTabletMobile
1–6 columns6 (half width)12 (full width)
7–12 columns12 (full width)12 (full width)
Example
Desktop                      Tablet                     Mobile
[ 3 ][ 3 ][ 3 ][ 3 ]         [ 6      ][ 6      ]       [ 12            ]
                             [ 6      ][ 6      ]       [ 12            ]
                                                        [ 12            ]
                                                        [ 12            ]

[ 8          ][ 4 ]          [ 12               ]       [ 12            ]
                             [ 6      ]                 [ 12            ]

How to override the width on one device

  1. Select the component and open the Responsive tab.
  2. Pick Tablet or Mobile at the top of the tab.
  3. Use the Width on tablet/mobile picker. The help text says "Automatic" until you set a value, then "Custom".
  4. To go back to the automatic width, click Clear tablet overrides (or mobile).

Example: two buttons that should stay side by side on a phone. Give each a mobile width of 6; the automatic rule would have stacked them at 12.

Equal-cell containers

A container's Arrange setting (Layout tab › Children) can be Grid with either "12 (span-based)" or "2, 3, 4 or 6 equal cells". Equal cells ignore spans: every child is the same width. On tablet, equal-cell grids show at most 2 columns; on mobile they show 1 column.

Common mistakes

  • Spans that add up to more than 12. The extra component wraps to the next row. Check the caption under the width picker.
  • Setting a mobile width of 4 for text-heavy components. A third of a 390 px phone is about 120 px: too narrow to read. Keep mobile spans at 6 or 12 for anything with text.
  • Using the Layout tab while looking at mobile. The Layout tab always edits the desktop base span. Use the Responsive tab for per-device widths.

Advanced

Spans are stored as layout.span (desktop) and responsive.tablet.span / responsive.mobile.span (overrides). The renderer writes them into CSS variables (--span-d, --span-t, --span-m) and the grid picks the right one with container queries at 1023 px and 639 px. The defaulting rule is defaultSpanFor(): mobile is always 12; tablet is 6 when the desktop span is 6 or less, otherwise 12. The resize_component command accepts an optional breakpoint.

Related

Was this helpful?