---
sourceDocument: Australia Build or modify applications
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/pt-BR/application-development

 Release :

    - australia

ft:locale :

    - pt-BR

ft:publication_title :

    - Australia Build or modify applications

ft:clusterId :

    - cadev

bundleId :

    - cadev

workflow :

    - Development, Data, and Analytics


---

# Using Flexbox layouts in UI Builder

# Using Flexbox layouts in UI Builder {#ariaid-title1}

* Versão de lançamento: Australia
* 
* Atualizado 12 de mar. de 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 4 min. de leitura

Create a Flexbox layout in UI Builder to build powerful pages so
that you can customize with cascading style sheets (CSS) and can improve your
performance.

You can easily build custom pages with Flexbox layouts in UI Builder. Customizing the layout of your page lets you take full advantage of Flexbox so that you can achieve your overall page design. For more information, see [Organize components in UI Builder pages](https://servicenow-prod.fluidtopics.net/EBKYgrU69vbvSMPnvzBcmQ "Column layouts organize components on a UI Builder page. Learn how column layouts are used in UI Builder.").

Flexbox is a one-dimensional layout system in CSS. Flexbox is inherently flexible, which is useful for when you don't know the size of your content. If you plan to build complex pages, you can customize the layout of your page in
the configuration panel styles tab or with CSS. Visit [Mozilla](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox) to learn more about Flexbox.  
You can change the direction of your content in the layout in the following ways:

* Row: Rows are organized left-to-right or right-to-left, depending on the direction of your browser's default language. Left/right is the case for an English browser.
* Row-reverse: Rows are organized in the reverse direction of your browser's default language, such as right-to-left or left-to-right.
* Column: Up/down or down/up
* Column-reverse: Down/upFigura 1. Flexbox row and column directions
* Justify content: Defines the alignment along the main axis. Choices are as follows:
  * Flex-start: Items are at the start of the flex direction, similar to left-justified content. This is the default setting.
  * Flex-end: Items are at the end of the flex direction, similar to right-justified content.
  * Space-between: Items are distributed evenly.
  * Space-around: Items are distributed evenly with equal space around them.
  * Space-evenly: The spacing between items is equal.
  {#flexbox-uib__ul_lxn_tgt_xrb}
* Align items: Defines how you want your flex content displayed along the cross axis. Choices are as follows:
  * Stretch: Stretch your content to fill the container. This is the default setting
  * Flex-start: Place your content at the start of the cross axis.
  * Flex-end: Place your content at the end of the cross axis.
  * Center: Center your content in the cross axis.
  * Base system: Align your content the same as your baseline alignment.
  {#flexbox-uib__ul_mxn_tgt_xrb}
* Height: Set the height automatically or manually.
* Width: Set the height of your flexbox items automatically or manually.
* Margin: Set your minimal distance between flexbox items.
* Padding: Set the padding for each side of your flexbox items.
{#flexbox-uib__ul_ixn_tgt_xrb}

## Create a Flexbox layout with the new layout system {#ariaid-title2}

Create a Flexbox layout in UI Builder to build powerful pages
in a low-code
environment.

### Antes de Iniciar

Role required: admin

### Procedimento

1. Navigate to AllNow Experience FrameworkUI Builder.
2. Open an experience to work in or create an experience by selecting CreateExperience.  
   See [Configure how users interact with your applications in UI Builder](https://servicenow-prod.fluidtopics.net/dUVGdKGQs6AbFNSw~vNKcQ "Learn what an experience is in UI Builder. Understand what an experience contains.") for more information on creating experiences.
3. [Create a page in UI Builder](https://servicenow-prod.fluidtopics.net/SclXrv5libg5iBN91G7scQ "Create a page in UI Builder for a portal, workspace, or custom application so that you can build a web experience for your users.").
4. Select the + Add content button in the UI Builder stage.
5. Select Flexbox in the layouts tab.  
6. Select Add.
7. Select the Styles tab in the configuration panel.
8. In the Layout section, you should see Flexbox highlighted.  
9. In the Layout section of the styles tab, you can change the following:  

   Direction
   :   Define how you want components to stack, horizontally or vertically.

   Align Items
   :   Define how components within containers align as a group.

   Justify content
   :   Define how to pack or space apart the components within the container.  
       Nota:  
       Select Show advanced layout options to see the next two options.

   Gap
   :   Set the size of the gap between rows and columns.

   Wrap child elements to multiple lines
   :   Set whether components are forced onto one line or overflow onto multiple
       lines.

   Visit [Mozilla](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox) to learn more about Flexbox
   layout
   configurations.
10. **Opcional:** You can edit the CSS code by selecting Show advanced configuration options at the bottom of the Styles tab, and then selecting the View and edit CSS option.
11. Select Save.  
    Your page refreshes and displays the changes made to the layout.
12. Add components to your page.  
    See [Add and configure components](https://servicenow-prod.fluidtopics.net/cbYaV7wlkZDBulAnOqnPNA#add-components "Learn how to add components to your page in UI Builder. A page is built by adding components.") for more information.
13. View and test your page by selecting ![Preview button that opens the page variant.]().

## Create a Flexbox layout with the old layout system {#ariaid-title3}

Create a Flexbox layout in UI Builder to build powerful pages
so that you can customize with cascading style sheets (CSS) and can improve your
performance.

### Antes de Iniciar

Role required: admin

### Por Que e Quando Desempenhar Esta Tarefa

In the following procedure, you learn how to use Flexbox to change the CSS code to
customize the layout of your page.

### Procedimento

1. Navigate to AllNow Experience FrameworkUI Builder.
2. Open an experience to work in or create an experience by selecting CreateExperience.  
   See [Configure how users interact with your applications in UI Builder](https://servicenow-prod.fluidtopics.net/dUVGdKGQs6AbFNSw~vNKcQ "Learn what an experience is in UI Builder. Understand what an experience contains.") for more information on creating experiences.
3. [Create a page in UI Builder](https://servicenow-prod.fluidtopics.net/SclXrv5libg5iBN91G7scQ "Create a page in UI Builder for a portal, workspace, or custom application so that you can build a web experience for your users.") or open a page.
4. Click the Layout tab and choose the two-column layout.  
   Figura 2. Standard two-column-layout
5. Click Edit layout code.  
   Figura 3. Edit the layout code
6. Expand the code editor so that you can easily view the CSS code.  
   Figura 4. Expand the code editor
7. Add another slot to the layout by copying the CSS code for an existing slot.  
   Copying the code is easier than typing it into the layout.
   Figura 5. Copy the CSS code for a slot
8. Below the code that you copied, place a comma and then paste the following CSS code:
   1. Change the "slotName" property to `"Column
      3",`.
   2. Change the "flex" property to `"2"`.
   3. Add `"margin-left": "1rem"`.

   {#flexbox-uib-old-layout__substeps_u5w_brr_qpb}  
   Figura 6. Paste the CSS code

   Changing the "flex" property increases the size of the
   column. By using "margin-left", you add space between the
   previous columns.
9. Collapse the expanded view, and then click Apply.  
   Figura 7. Apply a layout change

### Resultado

The new Flexbox layout that you created shows the new slot that you added to the original two-column layout.Figura 8. New custom layout  
Click Reset to original to reset layout changes back to the original. Figura 9. Reset a layout
**Tarefas relacionadas**   

* [Create a CSS Grid layout with the old layout system](https://servicenow-prod.fluidtopics.net/1c0FFMNWMO438eEZGSQxjA#create-a-css-grid-layout "Create a CSS Grid layout in UI Builder to build powerful pages so that you can customize with cascading style sheets (CSS) and can improve your performance.")

