---
title: "Table"
description: "Long tables page automatically."
---

> Documentation Index
> Fetch the complete documentation index at: https://gistui.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Table

```gistui
root = Table(signups, sort, search, tags:["Plan", "Status"], pageSize:4)
signups = |Company|Plan|MRR:n|Status
|Lumen Labs|Pro|1200|Active
|Brightwave|Enterprise|9800|Onboarding
|Kite & Co|Starter|240|Active
|Parallax|Pro|1650|Active
|Orbital|Business|4300|At risk
|Northwind|Starter|180|Active
```

## Signature

This is the line a model reads in the system prompt.

```gistui
Table(data:data, pageSize:num, sortable:[str], order:str, filter:[str], tags:[str], sort, search, striped)
```

- **Group:** Data
- **Children:** No
- **Positional arguments:** `data` (a trailing `?` means it may be left out)

## Props

| Prop | Type | How to write it | Notes |
|---|---|---|---|
| `data` | table | positional, required |  |
| `pageSize` | number | named: `pageSize:…` | rows per page, max 200; 0 = one page |
| `sort` | flag | bare word: `sort` | every column sortable |
| `sortable` | list of string | named: `sortable:…` | only these columns sortable |
| `order` | string | named: `order:…` | initial sort: "Col" or "-Col" (descending) |
| `search` | flag | bare word: `search` | search box |
| `filter` | list of string | named: `filter:…` | columns with filter chips |
| `tags` | list of string | named: `tags:…` | columns shown as tags |
| `striped` | flag | bare word: `striped` |  |

## Use your own component

Keep the name and schema, swap what is drawn. The prompt and the model's output do not change.

### React

```tsx
import { ui } from "@gistui/react/ui";

const lib = ui.extend({ Table: MyTable });
<GistUI library={lib} stream={response.body} />;
```
### Vue

```vue
<GistUI :source="answer" :components="{ Table: MyTable }" />
```
### Svelte

```svelte
<GistUI source={answer} components={{ Table: MyTable }} />
```
### Solid

```tsx
<GistUI source={answer()} components={{ Table: MyTable }} />
```
### Vanilla

```ts
import { ui } from "@gistui/vanilla/ui";

const lib = ui.extend({ Table: (ctx) => ({ el: myElement(ctx) }) });
```

See [Custom components](/docs/guides/custom-components/) for the full contract. Style hook: `[data-gistui="Table"]`.

Source: https://gistui.com/docs/components/data/table/index.mdx
