Page layout — Toggle

Flow components let us split our app UI into independent, reusable pieces. A page layout in Flow has the following components:

Content – Hidden | Presentation | List | Outcomes | Image
Input – Input | Radio | Checkbox | Toggle | Text | Rich Text | Combobox
Data – File Upload | Table | Files | Tiles
Charts – Bar | Line | Pie | Doughnut | Polar Area

Let’s take a look at the toggle component.


The toggle component lets us create toggle buttons that toggle between enabled/disabled or true/false.

We drag and drop the toggle component to a container in the page layout.

Like other components, this opens a configuration panel on the right-hand-side that lets us customize the component.

The selection made by the user (true/false) can be saved in a Boolean value.


We can change the shape and color of the toggle button by configuring the attributes either from the metadata or the drawing tool.

Key Value Description
shape {string} “Round” for rounded corners (default), “square” for not-rounded corners.
background {string} Supports any CSS color format string, or the following named colors: success, info, warning, danger.

Using the drawing tool:

Editing the metadata:

Goody bag

  1. Sample flow –
  2. Sample package –