# Build and reuse a Shared Section

> Maintain one set of controls centrally and place it in several positions so every instance updates when the master changes.

A Shared Section can help you maintain one set of buttons in a single place and reuse it everywhere it's needed: every position that uses it updates automatically whenever you edit the shared master, instead of needing the same change repeated by hand in every position that uses it.

## Before you begin

- Access to **Shared Sections** in the navigation, separate from any individual position.
- At least one position to place the shared section into.

## Create a Shared Section

1. Open **Shared Sections**: select **Position** in the main menu, then **Shared**.

![The Shared Sections list with one shared section, Cams, and its Edit button, and a Create button at the top of the list](https://bitfocus.io/api/docs-media/file/shared-sections-list.png?prefix=docs-media)

2. Select **Create**.
3. Enter a **Label**.
4. Set **Size**: width and height, from 1 up to 48 cells each.
5. Select **Create**.

![The Create shared section dialog with Label set to Cams and Size set to W 6 and H 2](https://bitfocus.io/api/docs-media/file/create-shared-section-dialog.png?prefix=docs-media)

6. Build the section's canvas the same way you'd build any other set of controls: add buttons manually or from [connection presets](/docs/buttons/v1.10/positions/use-connection-presets). Select **Apply** to save the master.

![The Cams shared section's own canvas, 6 by 2, with blue Cam 1 to 6 buttons in the top row](https://bitfocus.io/api/docs-media/file/shared-master.png?prefix=docs-media)

## Place it in a position

1. Open the position and select the canvas cells where the shared section should go.
2. Right-click the selection, then choose **Shared Section**.

![The right-click menu open on a 6 by 2 selection, with Shared Section highlighted under Create…](https://bitfocus.io/api/docs-media/file/create-shared-section-menu.png?prefix=docs-media)

3. Under **Insert existing**, point at a shared section to see a live preview of its contents, then select it. It's placed straight away. The same dialog also offers **Create New Master**.

![The Shared Section dialog with Cams under Insert existing, a preview of its Cam buttons beside the list, and a Create New Master button below](https://bitfocus.io/api/docs-media/file/insert-existing.png?prefix=docs-media)

The selected cells don't need to exactly match the shared section's own configured size: Buttons places the master's content into whatever area you selected, without resizing either the container or the content to match. For a clean result, select an area the same size as the shared section; a mismatched selection won't produce an error, but the layout may look cramped or leave empty space.

You can place the same Shared Section as many times as you want, in one position or across several. A placed instance shows the master's buttons; the cells the master leaves empty are shown hatched.

![Two instances of the Cams shared section on the same position, each marked Shared Section, with the master's empty cells hatched](https://bitfocus.io/api/docs-media/file/two-instances.png?prefix=docs-media)

## Edit the shared master

Select a placed instance to reveal **Edit Shared Section** in its section bar: this jumps straight to editing the master, rather than making you find it separately under **Shared Sections**. While you edit the master this way, **Go back to position** in the bottom-left corner returns you to the position you came from.

![A selected instance of the Cams shared section, with Section and Edit Shared Section in its label bar](https://bitfocus.io/api/docs-media/file/placed-instance.png?prefix=docs-media)

<callout color="yellow" title="Warning">
  Editing the master shared section updates every position that uses it, immediately and without a confirmation step. Confirm you're editing the master you intend before making changes you're not ready to see everywhere at once.
</callout>

If someone else saved the master after you opened it, **Apply** opens a **Changed Elsewhere** dialog instead of saving: "This shared section was changed elsewhere after this editor loaded it. Nothing was applied." Choose **Overwrite with my changes**, **Discard mine and reload**, or **Cancel**. See [If the position was changed elsewhere](/docs/buttons/v1.10/positions/create-your-first-button#if-the-position-was-changed-elsewhere) for what each choice does.

## Position variables inside a Shared Section

A Shared Section placed in a position uses that position's own Position Variables, not a separate scope of its own. This is what lets the same shared section reflect different values depending on which position it's currently placed in, such as a [Position Variable holding a connection](/docs/buttons/v1.10/variables/understand-variable-scope) that changes which device the shared section's buttons actually control.

## If you get stuck

| What you see | What to try |
| --- | --- |
| A shared section looks cramped or leaves empty space after placing it. | Select an area matching the shared section's own configured size before placing it. |
| You edited a shared section and don't see the change somewhere you expected. | Confirm you edited the master (via **Edit Shared Section** or **Shared Sections** directly), not a copy: a Shared Section instance has no independent content of its own. |
| **Apply** opens **Changed Elsewhere** instead of saving the master. | Someone else saved the master after you opened it. Choose **Cancel** if you aren't sure, then decide whether to overwrite their change or reload it. |
| A placed shared section shows a lock icon and **No Access**. | This can mean the underlying shared section was deleted. Check **Shared Sections** to confirm it still exists; if it doesn't, replace the instance with a working shared section or rebuild the controls directly. |

## Where to go next

- [Use a connection's presets](/docs/buttons/v1.10/positions/use-connection-presets), for populating a shared section quickly.
- [Understand variable scope](/docs/buttons/v1.10/variables/understand-variable-scope), for how Position Variables reach a shared section.
