> For the complete documentation index, see [llms.txt](https://docs.quantumbyte.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.quantumbyte.ai/home/quantumbyte-v2.0/3.microsites-1/8.ui/4.components/12.datatable.md).

# Data Table

### TableRow Props

| Name                   | Type    | Default                                                                           | Description                             |
| ---------------------- | ------- | --------------------------------------------------------------------------------- | --------------------------------------- |
| colors                 | object  |                                                                                   | Object with Tailwind CSS colors classes |
| colors.bgIos           | string  | 'hover:bg-black/5 dark:hover:bg-white/10'                                         | Table Row hover bg color                |
| colors.bgMaterial      | string  | 'hover:bg-md-light-secondary-container dark:hover:bg-md-dark-secondary-container' | Table Row hover bg color                |
| colors.dividerMaterial | string  | 'border-md-light-outline dark:border-md-dark-outline'                             | Table Row divider color                 |
| header                 | boolean |                                                                                   | Is located inside the TableHead         |

### TableCell Props

| Name                      | Type    | Default                                                                 | Description                             |
| ------------------------- | ------- | ----------------------------------------------------------------------- | --------------------------------------- |
| colors                    | object  |                                                                         | Object with Tailwind CSS colors classes |
| colors.textHeaderIos      | string  | 'text-black/45 dark:text-white/55'                                      | Table Cell header text color            |
| colors.textHeaderMaterial | string  | 'text-md-light-on-surface-variant dark:text-md-dark-on-surface-variant' | Table Cell header text color            |
| header                    | boolean |                                                                         | Is located inside the TableHead         |

### Examples <a href="#examples" id="examples"></a>

{% tabs %}
{% tab title="Vue" %}

<pre class="language-typescript"><code class="lang-typescript"><strong>&#x3C;template>
</strong>  &#x3C;i-page>
    &#x3C;i-navbar title="Data Table" />
    &#x3C;i-block-title>Plain table&#x3C;/i-block-title>
    &#x3C;div class="block overflow-x-auto mt-8">
      &#x3C;i-table>
        &#x3C;i-table-head>
          &#x3C;i-table-row header>
            &#x3C;i-table-cell header>Dessert (100g serving)&#x3C;/i-table-cell>
            &#x3C;i-table-cell header class="text-right">Calories&#x3C;/i-table-cell>
            &#x3C;i-table-cell header class="text-right">Fat (g)&#x3C;/i-table-cell>
            &#x3C;i-table-cell header class="text-right">Carbs&#x3C;/i-table-cell>
            &#x3C;i-table-cell header class="text-right">Protein (g)&#x3C;/i-table-cell>
          &#x3C;/i-table-row>
        &#x3C;/i-table-head>
        &#x3C;i-table-body>
          &#x3C;i-table-row>
            &#x3C;i-table-cell>Frozen yogurt&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">159&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">6.0&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">24&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">4.0&#x3C;/i-table-cell>
          &#x3C;/i-table-row>
          &#x3C;i-table-row>
            &#x3C;i-table-cell>Ice cream sandwich&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">237&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">9.0&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">37&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">4.4&#x3C;/i-table-cell>
          &#x3C;/i-table-row>
          &#x3C;i-table-row>
            &#x3C;i-table-cell>Eclair&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">262&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">16.0&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">24&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">6.0&#x3C;/i-table-cell>
          &#x3C;/i-table-row>
          &#x3C;i-table-row>
            &#x3C;i-table-cell>Cupcake&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">305&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">3.7&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">67&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">4.3&#x3C;/i-table-cell>
          &#x3C;/i-table-row>
        &#x3C;/i-table-body>
      &#x3C;/i-table>
    &#x3C;/div>
    &#x3C;i-block-title>Within card&#x3C;/i-block-title>
    &#x3C;i-card class="block overflow-x-auto mt-8" :content-wrap="false">
      &#x3C;i-table>
        &#x3C;i-table-head>
          &#x3C;i-table-row header>
            &#x3C;i-table-cell header>Dessert (100g serving)&#x3C;/i-table-cell>
            &#x3C;i-table-cell header class="text-right">Calories&#x3C;/i-table-cell>
            &#x3C;i-table-cell header class="text-right">Fat (g)&#x3C;/i-table-cell>
            &#x3C;i-table-cell header class="text-right">Carbs&#x3C;/i-table-cell>
            &#x3C;i-table-cell header class="text-right">Protein (g)&#x3C;/i-table-cell>
          &#x3C;/i-table-row>
        &#x3C;/i-table-head>
        &#x3C;i-table-body>
          &#x3C;i-table-row>
            &#x3C;i-table-cell>Frozen yogurt&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">159&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">6.0&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">24&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">4.0&#x3C;/i-table-cell>
          &#x3C;/i-table-row>
          &#x3C;i-table-row>
            &#x3C;i-table-cell>Ice cream sandwich&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">237&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">9.0&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">37&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">4.4&#x3C;/i-table-cell>
          &#x3C;/i-table-row>
          &#x3C;i-table-row>
            &#x3C;i-table-cell>Eclair&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">262&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">16.0&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">24&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">6.0&#x3C;/i-table-cell>
          &#x3C;/i-table-row>
          &#x3C;i-table-row>
            &#x3C;i-table-cell>Cupcake&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">305&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">3.7&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">67&#x3C;/i-table-cell>
            &#x3C;i-table-cell class="text-right">4.3&#x3C;/i-table-cell>
          &#x3C;/i-table-row>
        &#x3C;/i-table-body>
      &#x3C;/i-table>
    &#x3C;/i-card>
  &#x3C;/i-page>
&#x3C;/template>
&#x3C;script>
  import {
    iPage,
    iNavbar,
    iNavbarBackLink,
    iBlockTitle,
    iCard,
    iTable,
    iTableHead,
    iTableBody,
    iTableCell,
    iTableRow,
  } from 'ina-ui/vue';

  export default {
    components: {
      iPage,
      iNavbar,
      iNavbarBackLink,
      iBlockTitle,
      iCard,
      iTable,
      iTableHead,
      iTableBody,
      iTableCell,
      iTableRow,
    },

  };
&#x3C;/script>
</code></pre>

{% endtab %}

{% tab title="React" %}

```js
import React from 'react';
import {
  Page,
  Navbar,
  NavbarBackLink,
  BlockTitle,
  Card,
  Table,
  TableHead,
  TableBody,
  TableCell,
  TableRow,
} from 'ina-ui/react';

export default function DataTablePage() {
  return (
    <Page>
      <Navbar
        title="Data Table"
        />
      <BlockTitle>Plain table</BlockTitle>
      <div className="block overflow-x-auto mt-8">
        <Table>
          <TableHead>
            <TableRow header>
              <TableCell header>Dessert (100g serving)</TableCell>
              <TableCell header className="text-right">
                Calories
              </TableCell>
              <TableCell header className="text-right">
                Fat (g)
              </TableCell>
              <TableCell header className="text-right">
                Carbs
              </TableCell>
              <TableCell header className="text-right">
                Protein (g)
              </TableCell>
            </TableRow>
          </TableHead>
          <TableBody>
            <TableRow>
              <TableCell>Frozen yogurt</TableCell>
              <TableCell className="text-right">159</TableCell>
              <TableCell className="text-right">6.0</TableCell>
              <TableCell className="text-right">24</TableCell>
              <TableCell className="text-right">4.0</TableCell>
            </TableRow>
            <TableRow>
              <TableCell>Ice cream sandwich</TableCell>
              <TableCell className="text-right">237</TableCell>
              <TableCell className="text-right">9.0</TableCell>
              <TableCell className="text-right">37</TableCell>
              <TableCell className="text-right">4.4</TableCell>
            </TableRow>
            <TableRow>
              <TableCell>Eclair</TableCell>
              <TableCell className="text-right">262</TableCell>
              <TableCell className="text-right">16.0</TableCell>
              <TableCell className="text-right">24</TableCell>
              <TableCell className="text-right">6.0</TableCell>
            </TableRow>
            <TableRow>
              <TableCell>Cupcake</TableCell>
              <TableCell className="text-right">305</TableCell>
              <TableCell className="text-right">3.7</TableCell>
              <TableCell className="text-right">67</TableCell>
              <TableCell className="text-right">4.3</TableCell>
            </TableRow>
          </TableBody>
        </Table>
      </div>
      <BlockTitle>Within card</BlockTitle>
      <Card className="block overflow-x-auto mt-8" contentWrap={false}>
        <Table>
          <TableHead>
            <TableRow header>
              <TableCell header>Dessert (100g serving)</TableCell>
              <TableCell header className="text-right">
                Calories
              </TableCell>
              <TableCell header className="text-right">
                Fat (g)
              </TableCell>
              <TableCell header className="text-right">
                Carbs
              </TableCell>
              <TableCell header className="text-right">
                Protein (g)
              </TableCell>
            </TableRow>
          </TableHead>
          <TableBody>
            <TableRow>
              <TableCell>Frozen yogurt</TableCell>
              <TableCell className="text-right">159</TableCell>
              <TableCell className="text-right">6.0</TableCell>
              <TableCell className="text-right">24</TableCell>
              <TableCell className="text-right">4.0</TableCell>
            </TableRow>
            <TableRow>
              <TableCell>Ice cream sandwich</TableCell>
              <TableCell className="text-right">237</TableCell>
              <TableCell className="text-right">9.0</TableCell>
              <TableCell className="text-right">37</TableCell>
              <TableCell className="text-right">4.4</TableCell>
            </TableRow>
            <TableRow>
              <TableCell>Eclair</TableCell>
              <TableCell className="text-right">262</TableCell>
              <TableCell className="text-right">16.0</TableCell>
              <TableCell className="text-right">24</TableCell>
              <TableCell className="text-right">6.0</TableCell>
            </TableRow>
            <TableRow>
              <TableCell>Cupcake</TableCell>
              <TableCell className="text-right">305</TableCell>
              <TableCell className="text-right">3.7</TableCell>
              <TableCell className="text-right">67</TableCell>
              <TableCell className="text-right">4.3</TableCell>
            </TableRow>
          </TableBody>
        </Table>
      </Card>
    </Page>
  );
}
```

{% endtab %}
{% endtabs %}

::


---

# 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 dynamically by asking a question.

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

```
GET https://docs.quantumbyte.ai/home/quantumbyte-v2.0/3.microsites-1/8.ui/4.components/12.datatable.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.
