Each layout container on a UI Builder page can be set up as a Flexbox or a CSS Grid container from the Styles tab, or positioned with other CSS methods such as absolute positioning. Flexbox arranges items in one direction and suits content of unpredictable size. CSS Grid places items in rows and columns.
Choosing between Flexbox and CSS Grid
Flexbox handles one dimension at a time, so a row of buttons or a stack of cards fits it well. CSS Grid is a two-dimensional grid: you set the number of columns and rows, then place components into cells, and one component can cover more than one cell.
Sketch the page first. Count the full-width bands, then count the sections that sit side by side inside each band. That tells you how many containers you need.
| Question | Flexbox | CSS Grid |
|---|---|---|
| Directions controlled | One: a row or a column | Two: columns and rows together |
| Best fit | Content of varying length that should flow | A fixed frame with defined cells |
| Spanning | Items share the main axis | A component can span several cells |
| Core settings | Direction, Align Items, Justify content | Columns, Rows, Direction |
| Advanced settings | Gap, Wrap | Align items, Justify items, Align content, Justify content |
Creating the page and its first container
Select Create new page in the UI Builder experience, then choose Create from scratch instead. The URL path fills in from the page name. It must be unique, may contain digits, letters, hyphens, dots, underscores and tildes, and separates words with a slash or a hyphen. Choose a URL page type such as Dashboard, Knowledge base, List or Record, or leave it as None.
Parameters come next. A required parameter, such as a sys_id or a table name, appears in the URL and can be bound to components, so add one when a component needs it. Optional parameters are name and value pairs that work in any order. Choose Build responsive or Build without responsive. Responsive authoring applies to new pages built from scratch. Pages made from a template, and existing pages, keep the default reflow model.
In the editor, select + Add content in the stage, open the layouts tab, choose Flexbox or Grid, and select Add. The Layout section of the Styles tab then shows the system you picked, highlighted. The Flexbox and Grid steps list the admin role, while creating pages and variants lists the ui_builder_admin role.
Settings that shape a Flexbox container
- Direction decides whether components stack in a row or a column. A row runs left to right or right to left, following the default language of the browser. The reverse options flip the order.
- Justify content packs the group along the main axis. Flex-start is the default. Space-between spreads items evenly, Space-around gives equal space around each item, and Space-evenly makes the gaps between items identical.
- Align Items positions items on the cross axis. Stretch is the default and fills the container. Flex-start, Flex-end, Center and Baseline place items at that position instead.
- Height and width can be automatic or fixed. Margin sets the minimum distance between items, and padding is set per side.
Under the advanced options, Gap sets the space between rows and columns. Wrap decides whether components stay on one line or flow onto more lines.
Settings that shape a CSS Grid container
- Columns sets the number, order and width of columns. Rows does the same for rows.
- Direction controls whether newly added components stack horizontally or vertically.
- Gap sets the space between rows and columns.
The advanced group adds Align items, which arranges components as a group, and Justify items, which shares space along the inline axis. Align content shares space along the block axis, and Justify content packs the components.
For layouts the settings cannot express, open Show advanced configuration options at the bottom of the Styles tab and choose the option to view and edit CSS. Select Save, and the page refreshes with the new layout.
Placing and arranging components
Components are the building blocks, such as buttons, headings, lists and forms. Add one in three ways:
- From the page, select + and choose a component from the toolbox, searching or scrolling it.
- From the floating menu above a component, select Add before or Add after, then choose the component.
- From the content tree, select + Add content and then choose a component.
The content tree lists all containers, columns and components. Selecting an entry highlights it on the stage, and dragging an entry reorders the page. Label each component as you add it. The label appears in the tree and forms the starting point for the component ID.
A column layout holds up to six columns, and a column can hold several components. An empty column creates white space. Add column layouts from the stage or the Content tree.
Configuring components
Each component has three configuration areas. The Config tab sets its properties, the Styles tab adds CSS overrides, and the Events tab binds actions. A button does nothing until you bind an event to it. For client actions in more detail, see UXF client actions in UI Builder.
Each property takes one of three forms. Static means you pick from a list or type a value. Dynamic data binding ties the property to a data resource, a page property or client state. Script means you write JavaScript that supplies the value. A button needs little configuration, while a list needs a great deal. UI Builder’s low-code JSON editor can also modify component properties.
Style overrides affect one component. To change all components in an experience, apply a theme instead. The eye icon controls visibility based on a property of the component itself, not on who is viewing the page. A common case is hiding an image whose link is broken. Set a test value to check the true, false and unset states.
Duplicating a component copies its properties, bindings and events, but the copy gets a new name and ID.
Using presets
Presets apply a predefined set of property values and event mappings to a component, and they apply to certain components. Each preset gets its data from a controller. Page templates include controllers, and a preset whose controller is not yet on the page adds it when you apply the preset. A typical preset configures a Form component with the fields that normally sit on a record page.
Default presets apply automatically when a page is created from a template, or when the controller is already on the page. In the Configuration pane you can choose between applying a preset and configuring by hand. Preset-driven properties appear read-only. Overriding one means you take ownership of that part of the configuration and its upkeep. In the Australia release, sub-pages do not inherit controllers and cannot use presets.
To build your own, select Create, then Preset. Enter a name for internal tracking, choose the component and its controller, and write a description that tells page builders what the preset contains. Enter controller test values so the preview fills in, drag controller data into the matching fields, add any events, and save.
Managing variants and conditions
A variant is a version of a page at the same path that targets a different audience. A manager’s version of a team page and an employee’s version can share one URL, with the audience deciding who sees which. Assign audiences when you create the variant.
Conditions decide when a variant displays, and they can check parameters that have already been added. The Standard record template includes table and sys_id parameters, so a variant can show when a Task record is open. Each condition compares a parameter with a value using an operator such as is, is not or starts with. When variants share identical conditions, the order setting decides which one displays.
Undo and redo cover the previous 20 actions but not data shelf changes. To see a page as a user would load it, choose Open URL path from the Preview drop-down.
Upgrading older layouts
The San Diego release enhanced the layout system with a simpler content tree, a new styling panel, low-code controls for Flexbox and Grid, and layouts that no longer need slots. Newly created variants all use it. Existing pages can be upgraded one page or variant at a time.
An upgrade changes the layout and nothing else. Component data and component styling are left alone, and slots are migrated into containers. Because styles move from slots to containers without a one-to-one match, complex pages can show visual misalignments that need manual fixes.
Open the page and look for the red dot marking a variant that can be upgraded. Select Update layout, compare the two versions in the two browser tabs, then choose Keep new or Use old and confirm. Pages built with the older row and column system, from before the Quebec release, cannot be upgraded and must be rebuilt. Upgrading requires the ui_builder_admin role. For other setup pitfalls, see common UI Builder mistakes. For the full set of guides in this area, see the UI Builder and Workspaces hub.
Frequently asked questions
Can a page use more than one layout?
Yes. Several column layouts can be stacked on one page, and you choose Flexbox or Grid for each one.
Do I need CSS to build a layout?
No. The low-code settings in the Styles tab configure Flexbox and Grid without writing CSS. CSS editing sits under the advanced configuration options for layouts that need more control.
Why does my change not show on the stage?
Reload the stage from the Open menu under Developer. Reloading displays your changes but does not save them, so select Save at the top right.
Why did my layout shift after an upgrade?
Styles move from slots into containers during the upgrade, so the result may differ. Components and data are not affected, so compare the two versions and adjust the layout by hand.