# Organize controls with a Folder Section

> Arrange controls as navigable folder pages within one area of a position, with generated or custom navigation.

Use a Folder Section to arrange related controls as navigable pages within one area of a position. This works well when the same surface area must hold several recognizable groups, such as lighting, displays, and audio controls for a room.

Before you begin, [create a position and open its editor](/docs/buttons/v1.10/positions/create-a-position). Add the controls only to a position that is safe to edit and operate.

## Create a Folder Section

1. Select the canvas cells that should contain the section.

![A single canvas cell selected, marked by a dashed bounding box](https://bitfocus.io/api/docs-media/file/select-first-cell-3.png?prefix=docs-media)

![The selection dragged across a block of cells, showing the hint “Right click to create…” inside it](https://bitfocus.io/api/docs-media/file/drag-to-size-section-3.png?prefix=docs-media)

2. Right-click the selection, then choose **Create... → Folder Section**.

![The right-click menu open on the selection, with Folder Section highlighted under Create…](https://bitfocus.io/api/docs-media/file/create-folder-section-menu-1.png?prefix=docs-media)

3. Select the new Folder Section and open the **Navigation** tab in the inspector.

![The new Folder Section showing its Main page with Folder 1, Folder 2, and Folder 3 controls, and a Main page picker in its label bar](https://bitfocus.io/api/docs-media/file/folder-section-created-1.png?prefix=docs-media)

![The Navigation tab with the Pages list showing Main and its three folders, Add Folder below the list, and the Folders/Shift Buttons, Return Button, and Scroll settings](https://bitfocus.io/api/docs-media/file/folder-navigation-tab.png?prefix=docs-media)

4. In the **Pages** list, double-click **Folder 1**, **Folder 2**, and **Folder 3** in turn to rename them for the groups people need to find. For the room example, use `Lighting`, `Displays`, and `Audio`.

![The Main page with the renamed Lighting, Displays, and Audio folder controls, each in its own color](https://bitfocus.io/api/docs-media/file/renamed-folders.png?prefix=docs-media)

5. Select **Apply** to save the section.

A new Folder Section has a **Main** page and three folders. During operation, the Main page presents the folder controls. Opening a folder shows the controls assigned to that page and a return control.

## Add controls to each folder

1. Select `Lighting` in the **Pages** list.
2. Add the controls for that group to the section.
3. Repeat for `Displays` and `Audio`.
4. Select **Apply**.

Selecting a page in the editor displays its contents without changing the live position. The section's label bar on the canvas shows the path to the page you're viewing, such as **Main › Lighting**.

## Add and arrange folders

Select **Add Folder** to create another folder. The selected page becomes its parent; when no child folder is selected, the new folder is added under **Main**.

Drag folders in the **Pages** list to reorder them or place one inside another. You can also change each folder control's label, color, icon, and style in the list.

Nested folders can keep a large set of controls organized, but every level adds another navigation step.

![A Folder Section with Lighting, Displays, and Audio folders and a Mics folder nested inside Audio in the Pages list, each with its own color, and the open Lighting folder on the canvas showing Scene 1 to 12 and a Back control](https://bitfocus.io/api/docs-media/file/nested-folder-hierarchy-1.png?prefix=docs-media)

<callout color="green" title="Tip">
  Keep the generated **Return Button** visible unless custom navigation provides an equally clear route back.
</callout>

## Position the navigation controls

Use the Folder Section's navigation settings to fit the generated controls around the content:

- **Folders/Shift Buttons** shows or hides the folder controls and sets where they appear.
- **Return Button** shows or hides the control that returns from the current folder and sets its position.
- **Scroll** makes controls beyond the visible area reachable. When scrolling is on, **Scrollbar** controls where its indicator appears.

Select **Apply** after changing the layout.

## Use custom navigation

The generated folder and return controls provide the shortest setup. If the position needs navigation controls elsewhere, add a button with the Buttons internal action **Set Active Page**, then select the Folder Section and destination page.

After the custom controls provide a clear way into and out of every folder, you can hide the generated controls under **Folders/Shift Buttons** or **Return Button**. Do not remove the only visible route back to **Main**.

### Example: turn a Folder Section into a menu

With the generated controls hidden, a row or column of ordinary buttons outside the section works as a menu: each one opens its own folder, and the Folder Section becomes the area that shows the chosen group. In this example, three menu buttons next to the room's Folder Section open `Lighting`, `Displays`, and `Audio`, and the button for the open folder lights up.

![The Folder Section showing the Lighting page with Scene 1 to 12, and a column of Lighting, Displays, and Audio menu buttons to its right, with Lighting lit red](https://bitfocus.io/api/docs-media/file/external-menu.png?prefix=docs-media)

1. Select the Folder Section, open the **Navigation** tab, and turn off **Folders/Shift Buttons** and **Return Button**. The section no longer shows folder or return controls of its own.

![The Navigation tab with Folders/Shift Buttons and Return Button both turned off](https://bitfocus.io/api/docs-media/file/generated-controls-off.png?prefix=docs-media)

2. Add a position variable to remember which folder is open: on any button's **Variables** tab, select **+** next to **Position**, name it `menu`, keep **Type** as **String**, and select **Create**.
3. Create a button outside the section and set its **Text** to `Lighting`.
4. On its **Actions** tab, add two actions under **Press**:

- **Set Active Page**, with **Section** set to the Folder Section and **Page** set to `Lighting`.
- **Set Position Variable**, with **Variable** set to `menu` and **Value** set to `Lighting`.

![The Lighting button's Press handler with Set Active Page and Set Position Variable, and Set Active Page set to This Position, Folder Section 1, and the Lighting page](https://bitfocus.io/api/docs-media/file/menu-button-actions.png?prefix=docs-media)

5. On its **Feedbacks** tab, add the Internal **Expression** feedback with the expression `$(position.state.menu) == 'Lighting'`, and set the look you want for the active menu item. The default is a red background.

![The Lighting button's Expression feedback, active, with the expression $(position.state.menu) == 'Lighting', the result = true below it, and a red Preview](https://bitfocus.io/api/docs-media/file/menu-button-feedback.png?prefix=docs-media)

6. Copy the button for `Displays` and `Audio`, and change the **Text**, the **Page**, the variable **Value**, and the name in the expression on each copy.
7. Select **Apply**.

Hold **Shift** and click a menu button on the canvas to try it: the section switches to that folder and the button lights up. The highlight follows the `menu` variable, not the section itself, so let only the menu buttons change the section's page. If you also want a way back to an empty **Main** page, add a fourth menu button for **Main**.

## Where to go next

- Use a [Shift Section](/docs/buttons/v1.10/positions/shift-sections) when the controls need only a primary and secondary layer.
- [Add a Popover Section](/docs/buttons/v1.10/positions/popover-sections) when occasional controls should open temporarily instead of replacing the section's current page.
- Add a Folder Section inside a [Custom Router](/docs/buttons/v1.10/positions/custom-router) when routing controls need categories; keep those controls inside the Custom Router so they use its routing state.
