> For the complete documentation index, see [llms.txt](https://dev.ubidots.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.ubidots.com/apps/styling-with-css/application-css/sidebar.md).

# Sidebar

Classes for the Sidebar component.

## Overview

The Sidebar component in VulcanUI features a hierarchical structure that mirrors the actual HTML DOM. This page provides a comprehensive guide to all available BEM classes for styling and customizing the Sidebar.

The Sidebar component follows a strict hierarchical structure with the root container `ds-sidebar__viewport` containing all sub-elements. Each level serves a specific purpose and can be styled independently.

```html
<aside class="ds-sidebar__viewport">
  <!-- All Sidebar content nested here -->
</aside>
```

<figure><img src="https://884329393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhzNRg0B4ECiNXc093G%2Fuploads%2FVnyvu7LbhCZ8yscohipr%2FSidebar%20with%20custom%20CSS.png?alt=media&amp;token=76792279-8457-43bb-8ad1-6f2475ff27dd" alt="" width="248"><figcaption></figcaption></figure>

## Class hierarchy

The hierarchical class structure is as follows. Modifiers are shown in parentheses.

```
 * ds-sidebar__viewport (--open --closed)
 * └── ds-sidebar__wrapper
 *     ├── ds-sidebar__header
 *     │   ├── ds-logo
 *     │   │   └── ds-logo__image
 *     │   └── ds-sidebar__toggle (--open --closed)
 *     ├── ds-sidebar__body
 *     │   ├── ds-sidebar__item (--active)
 *     │   └── ds-accordion (--expanded --collapsed) [Only when open]
 *     │       ├── ds-accordion__toggle (--expanded --collapsed)
 *     │       ├── ds-accordion__chevron (--expanded --collapsed)
 *     │       │   └── ds-accordion__chevron-icon
 *     │       └── ds-accordion__content (--visible)
 *     │           └── ds-accordion__item (--active)
 *     │               └── ds-accordion__item-label
 *     └── ds-sidebar__footer-wrapper
 *         └── ds-sidebar__footer
 *             └── ds-sidebar__footer-item
```

The following images map the Sidebar classes by number. This helps you target the exact part you want in your custom CSS stylesheet.

## Sidebar classes

### Outer

1. `ds-sidebar__viewport`
2. `ds-sidebar__wrapper` (same size as `ds-sidebar__viewport`)
   1. `ds-sidebar__header`
   2. `ds-sidebar__body`
   3. `ds-sidebar__footer-wrapper`

<figure><img src="https://884329393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhzNRg0B4ECiNXc093G%2Fuploads%2Fol1jKOBi7VtNFJPW7ReA%2FSidebar%20outer%20classes.png?alt=media&amp;token=ae04b33d-6862-4564-a518-e9122e2ce68c" alt="" width="283"><figcaption></figcaption></figure>

### Header

The parent class for the sidebar header is `ds-sidebar__header`.

1. `ds-logo`
   1. `ds-logo__image`
2. `ds-sidebar__toggle`

<figure><img src="https://884329393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhzNRg0B4ECiNXc093G%2Fuploads%2FHkwt3XD3gkLTflKDc1Dt%2FSidar%20header%20classes.png?alt=media&amp;token=e3792bfe-84e4-42bc-be7c-0b32c80283be" alt="" width="314"><figcaption></figcaption></figure>

### Body

The parent class for the sidebar body is `ds-sidebar__body`.

1. `ds-sidebar__item`
2. `ds-accordion`
   1. `ds-accordion__toggle`
   2. `ds-accordion__chevron`
      1. `ds-accordion__chevron-icon`
   3. `ds-accordion__content`
      1. `ds-accordion__item`

<figure><img src="https://884329393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhzNRg0B4ECiNXc093G%2Fuploads%2FJKPuanHKrYMO3K7OxB6S%2FSidebar%20body%20classes.png?alt=media&amp;token=bbf89761-a3ed-4a6b-8968-637b62165382" alt="" width="278"><figcaption></figcaption></figure>

### Footer

The parent class for the footer is `ds-sidebar__footer-wrapper`.

1. `ds-sidebar__footer`
   1. `ds-sidebar__footer-item`

<figure><img src="https://884329393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhzNRg0B4ECiNXc093G%2Fuploads%2F6IuZDhFKxNDhC3F78Clu%2FSidebar%20footer.png?alt=media&amp;token=0b5e8d77-1827-462c-82db-55fd5f48e2b0" alt="" width="373"><figcaption></figcaption></figure>

## Rendered DOM

This is the raw Sidebar HTML DOM as loaded in the application, with all classes shown in this section:

<details>

<summary>Sidebar component HTML DOM</summary>

```html
<aside class="ds-sidebar__viewport ds-sidebar__viewport--open">
  <div class="ds-sidebar__wrapper">
    <header class="ds-sidebar__header">
      <div>
        <a href="/app/dashboards">
          <img alt="Logo" src="https://d37r24zvv6zb85.cloudfront.net/production/media/ent_navbar_logos/68a00c069807fa008cab1a53_8c505a3153cb4103bea62f00e1dd049e.png">
        </a>
      </div>
      <button class="ds-sidebar__toggle ds-sidebar__toggle--open">
        <i class="fa fa-chevron-left" role="icon"></i>
      </button>
    </header>
    <div class="ds-sidebar__body">
      <div>
        <div>
          <div>
            <div>
              <a class="ds-sidebar__item" href="/app/dashboards/">
                <span>
                  <i class="fas fa-home" role="icon"></i>
                </span>
                <span>Home</span>
              </a>
              <details open="">
                <summary aria-expanded="false" type="button" aria-haspopup="true" role="button">
                  <span>
                    <i class="fa fa-microchip" role="icon"></i>
                  </span>
                  <span>Devices</span>
                  <div>
                    <i class="fa fa-chevron-down" role="icon"></i>
                  </div>
                </summary>
              </details>
              <details open="">
                <summary aria-expanded="false" type="button" aria-haspopup="true" role="button">
                  <span>
                  <i class="fa fa-objects-column" role="icon"></i>
                  </span>
                  <span>Data</span>
                  <div>
                    <i class="fa fa-chevron-down" role="icon"></i>
                  </div>
                </summary>
              </details>
              <details open="">
                <summary aria-expanded="false" type="button" aria-haspopup="true" role="button">
                  <span>
                  <i class="fa fa-user" role="icon"></i>
                  </span>
                  <span>Users</span>
                  <div>
                    <i class="fa fa-chevron-down" role="icon"></i>
                  </div>
                </summary>
              </details>
            </div>
          </div>
        </div>
      </div>
    </div>
    <footer class="ds-sidebar__footer-wrapper">
      <ul class="ds-sidebar__footer">
        <li class="ds-sidebar__footer-item">
          <div>
            <i class="fa fa-bell" role="icon"></i>
          </div>
        </li>
        <li class="ds-sidebar__footer-item">
          <div>
            <div aria-haspopup="true" aria-expanded="false">
              <img alt="Profile image" src="//www.gravatar.com/avatar/e4fc255de696a78fdb70d6e752038a0b?s=100&amp;d=mm">
              <i class="fa fa-caret-down" role="icon"></i>
            </div>
          </div>
        </li>
      </ul>
    </footer>
  </div>
</aside>
```

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://dev.ubidots.com/apps/styling-with-css/application-css/sidebar.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
