# Reusable sidebar

## Overview

Reusable sidebar serves as a navigation bar in your application. The sidebar can be customized according to your requirements, and it saves its state across all the application pages so you don't have to add it to each page separately.

<figure><img src="https://837703843-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX6zPRMFFK0yrTghj7cY%2Fuploads%2F7nXI5VO6g7JuAboZ3Xa1%2FCleanShot%202025-02-24%20at%2013.15.04%402x-min.png?alt=media&#x26;token=830374b1-beb5-4143-ac34-97c5cc48aca3" alt=""><figcaption></figcaption></figure>

### Properties

<table><thead><tr><th width="125.796875">Name</th><th width="121.09375">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>collapsed</code></td><td><code>boolean</code></td><td>Indicates if the component is collapsed</td></tr></tbody></table>

### Methods

<table><thead><tr><th width="106.12890625">Name</th><th width="126.49609375">Parameters</th><th width="102.13671875">Returns</th><th>Description</th></tr></thead><tbody><tr><td><code>expand</code></td><td>–</td><td><code>void</code></td><td>Expand the sidebar</td></tr><tr><td><code>collapse</code></td><td>–</td><td><code>void</code></td><td>Collapse the sidebar</td></tr><tr><td><code>toggle</code></td><td>–</td><td><code>void</code></td><td>Toggle the sidebar between expanded and collapsed</td></tr></tbody></table>

### Triggers

<table><thead><tr><th width="122.19921875">Name</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>On Init</strong></td><td>Triggered when the component is initialized</td><td></td></tr><tr><td><strong>On Expand</strong></td><td>Triggered when the component is expanded</td><td></td></tr><tr><td><strong>On Collapse</strong></td><td>Triggered when the component is collapsed</td><td></td></tr></tbody></table>

## Working with the component

To activate the sidebar in your application, access the *Settings* sidebar of the current page (click on the app area or select the page in the *Pages* tab), and select the **Show global app sidebar** checkbox.

You can configure sidebar content and appearance using the following *parameters*:

* **Expand content to fit** - select this option if you want your component (for example, *Menu*) to occupy all available space inside the sidebar (works with **single component only**).\
  Check out [this article](https://docs.uibakery.io/concepts/components/work-with-components/expand-component-to-fill-screen-container) to learn more about the feature.
* **Sticky sidebar** - select this option to make sure the sidebar stays in the same place while users are scrolling down the page
* **Width -** in pixels
* **Background** color
* **Disable container styles** - select to disable all styles or specific ones if you want the sidebar to look more like part of the page and not a separate container

To configure sidebar navigation, you can simply drag and drop components inside it, for example, the *Menu* component. From there, you can configure additional[ in-app](https://docs.uibakery.io/how-tos/layout-and-navigation/add-navigation-to-application#in-app-navigation) or [external](https://docs.uibakery.io/how-tos/layout-and-navigation/add-navigation-to-application#external-navigation) navigation if needed.

{% @arcade/embed flowId="zD86AyBhpFd8DgB4cp6q" url="<https://app.arcade.software/share/zD86AyBhpFd8DgB4cp6q>" %}
