# Sidebar

## 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="/files/YbCrzNFx6mpqVtahmBKo" 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="/files/S1k6i3wsPTYRmTbz0cz2" 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="/files/yGCFXyHxMTV96MURBaOj" 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="/files/vk9k3V3iBG8JjPCCJxQu" 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="/files/BkA8jBhqULSvx9d1iJlg" 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: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

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

The question should be specific, self-contained, and written in natural language.
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.
