> 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/table.md).

# Table

Classes for the Table component.

## Overview

The Table component is one of the most complex components in VulcanUI. It features a hierarchical structure that mirrors the actual HTML DOM. This documentation provides a comprehensive guide to all available BEM classes for styling and customizing the Table.

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

```html
<div class="ds-table__viewport">
  <!-- All table content nested here -->
</div>
```

<figure><img src="https://884329393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhzNRg0B4ECiNXc093G%2Fuploads%2FNZlO24o8RNo6LE6dhJFT%2FBranded%20CSS%20native%20table.png?alt=media&amp;token=a4de56c1-af2f-46e6-bb56-da89d5cd4cc0" alt=""><figcaption></figcaption></figure>

## Class hierarchy

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

```
 * ds-table__viewport (--sticky-footer)
 * ├── ds-table__toolbar
 * │   ├── ds-table__toolbar-actions
 * │   └── ds-table__search (--active)
 * │       ├── ds-table__search-icon
 * │       └── ds-table__search-input (--active)
 * ├── ds-table__wrapper
 * │   └── ds-table
 * │       ├── ds-table__head (--sortable --selectable --actions)
 * │       │   └── ds-table__row
 * │       │       └── ds-table__cell (--sortable --sorted-{value} --centered --right)
 * │       │           ├── ds-table__text
 * │       │           └── ds-table__cell-checkbox (--checked --disabled)
 * │       └── ds-table__body (--loading --empty --pinned)
 * │           └── ds-table__row (--selected --pinned --expanded --new)
 * │               └── ds-table__cell (--centered --right --editable --inactive)
 * │                   ├── ds-table__text
 * │                   ├── ds-table__cell-checkbox (--checked --disabled)
 * │                   └── ds-table__cell-actions (--visible)
 * │                       └── ds-table__cell-actions-button (--disabled)
 * └── ds-table__controls (--sticky)
 *     ├── ds-table__pagination
 *     ├── ds-table__pagination-button (--disabled --prev --next)
```

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

## Table classes

### Outer

1. `ds-table__viewport`
2. `ds-table__toolbar`
3. `ds-table__wrapper`
4. `ds-table__controls`

<figure><img src="https://884329393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhzNRg0B4ECiNXc093G%2Fuploads%2F1o3I9ulX9dOzZ0wSxTxs%2FTable%20outer%20classes.png?alt=media&amp;token=6b59bff7-1471-459e-b120-2d3178c81118" alt=""><figcaption></figcaption></figure>

### Toolbar

The parent class for the toolbar is `ds-table__toolbar`.

1. `ds-table__toolbar-actions`
2. `ds-table__filters`
   1. `ds-table__search`
      1. `ds-table__search-icon`
      2. `ds-table__search-input`

<figure><img src="https://884329393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhzNRg0B4ECiNXc093G%2Fuploads%2FrFxTwyMwaEOyYfuvG0ZY%2FTable%20toolbar%20classes.png?alt=media&amp;token=fa57e717-04db-446e-9587-9e329d8399ff" alt=""><figcaption></figcaption></figure>

### Table wrapper

The parent class for the table content is `ds-table__wrapper`.

1. `ds-table`
   1. `ds-table__head`
   2. `ds-table__body`

<figure><img src="https://884329393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhzNRg0B4ECiNXc093G%2Fuploads%2FQykvGOSydrhkfEQoRYjo%2FTable%20head%20and%20body.png?alt=media&amp;token=d3448170-4891-4e3e-a809-b6ef2f158900" alt=""><figcaption></figcaption></figure>

#### Table head

The parent class for the table content is `ds-table__head`.

1. `ds-table__row`
   1. `ds-table__cell`
      1. `ds-table__text`
      2. `ds-table__cell-checkbox`

<figure><img src="https://884329393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhzNRg0B4ECiNXc093G%2Fuploads%2FYGNdYmvmy2Yhi5IPcH3g%2FTable%20head%20row.png?alt=media&amp;token=de8a65fa-b1fd-457e-b709-5ea74828079e" alt=""><figcaption></figcaption></figure>

#### Table body

The parent class for the table content is `ds-table__body`.

1. `ds-table__row`
   1. `ds-table__cell`
      1. `ds-table__text`
      2. `ds-table__cell-checkbox`
      3. `ds-table__cell-actions`
         1. `ds-table__cell-actions-button` (This is the actual HTML `<button>` element in the actions menu.)

<figure><img src="https://884329393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhzNRg0B4ECiNXc093G%2Fuploads%2FXd4MHc454ssIkQQMAQ4p%2FTable%20row.png?alt=media&amp;token=7f6fe194-df60-46d9-b1e9-59df46fda059" alt=""><figcaption></figcaption></figure>

### Controls

The parent class for the table content is `ds-table__controls`.

1. `ds-table__pagination`
2. `ds-table__pagination-button`

<figure><img src="https://884329393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhzNRg0B4ECiNXc093G%2Fuploads%2F4MMmbH5H4XMsTOX084j8%2FTable%20controls.png?alt=media&amp;token=e3b94822-8f0b-4be2-9635-b94ccd3380be" alt=""><figcaption></figcaption></figure>

## Rendered DOM

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

<details>

<summary>Table component HTML DOM</summary>

```html
<div class="ds-table__viewport">
  <div class="ds-table__toolbar">
    <div>
      <h3>1 Device</h3>
      <div class="ds-table__toolbar-actions"></div>
    </div>
    <div class="ds-table__filters">
      <div class="ds-table__search">
        <div class="ds-table__search-icon">
          <i class="fa fa-search" role="icon"></i>
        </div>
        <input class="ds-table__search-input" type="search" placeholder="Search" value="">
      </div>
      <button type="button" aria-haspopup="true" aria-expanded="false">
        <i class="fa fa-filter" role="icon"></i>
      </button>
      <button type="button">
        <i class="fas fa-grid-horizontal" role="icon"></i>
      </button>
    </div>
  </div>
  <div class="ds-table__wrapper">
    <table class="ds-table">
      <thead class="ds-table__head ds-table__head--sortable ds-table__head--selectable ds-table__head--actions">
        <tr class="ds-table__row">
          <th class="ds-table__cell" role="columnheader">
            <input class="ds-table__cell-checkbox" type="checkbox">
          </th>
          <th class="ds-table__cell ds-table__cell--sortable">
            <span class="ds-table__text"></span>
          </th>
          <th class="ds-table__cell ds-table__cell--sortable">
            <span class="ds-table__text">Name</span>
          </th>
          <th class="ds-table__cell ds-table__cell--sortable">
            <span class="ds-table__text"></span>
          </th>
          <th class="ds-table__cell ds-table__cell--sortable">
            <span class="ds-table__text">API label</span>
          </th>
          <th class="ds-table__cell ds-table__cell--sortable">
            <span class="ds-table__text">Organization</span>
          </th>
          <th class="ds-table__cell">
            <button type="button" aria-haspopup="true" aria-expanded="false">
              <i class="fa fa-columns" role="icon"></i>
            </button>
          </th>
        </tr>
      </thead>
      <tbody class="ds-table__body">
        <tr class="ds-table__row" role="row">
          <td class="ds-table__cell" role="cell">
            <input class="ds-table__cell-checkbox" type="checkbox">
          </td>
          <td class="ds-table__cell">
            <i class="fa fa-microchip" role="icon"></i>
          </td>
          <td class="ds-table__cell">
            <a href="/app/devices/68a2383d4bc5956b8d5f0b20">Test</a>
          </td>
          <td class="ds-table__cell">
            <div role="status"></div>
          </td>
          <td class="ds-table__cell">
            <span>test</span>
          </td>
          <td class="ds-table__cell">
            <span>Org 1</span>
          </td>
          <td class="ds-table__cell">
            <div class="ds-table__cell-actions ds-table__cell-actions--visible">
              <button type="button" class="ds-table__cell-actions-button">
                <i class="fa fa-sitemap" role="icon"></i>
              </button>
              <button type="button" class="ds-table__cell-actions-button">
                <i class="fa fa-trash" role="icon"></i>
              </button>
            </div>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
  <div class="ds-table__controls">
    <div class="ds-table__pagination">
      <p>Devices per page</p>
      <button type="button" aria-haspopup="true" aria-expanded="false">
        <span>10</span>
        <i class="fa fa-caret-down" role="icon"></i>
      </button>
    </div>
    <div aria-label="pagination info">
      <p aria-label="from number value">1</p>
      -
      <p aria-label="to number value">1</p>
      of
      <p aria-label="total table number value">1</p>
    </div>
    <div>
      <button aria-label="show previous page" class="ds-table__pagination-button ds-table__pagination-button--disabled ds-table__pagination-button--prev" disabled>
        <i class="fa fa-chevron-left" role="icon"></i>
      </button>
      <button aria-label="show next page" class="ds-table__pagination-button ds-table__pagination-button--disabled ds-table__pagination-button--next" disabled>
        <i class="fa fa-chevron-right" role="icon"></i>
      </button>
    </div>
  </div>
</div>
```

</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/table.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.
