# Table card

> The card show_table renders, records of one kind as rows and the fields they share as columns.

The table card lays out records of one kind: rows of the same shape, with the fields they share as columns. The assistant shows it with `show_table` when the user asks to see data laid out.

![The sheet panel on Orders. The user asked for the open orders as a table, and a table titled Orders waiting to ship lists Acme, Globex and Umbrella with their totals.](https://superassist.app/_astro/table-light.B2jqtMVp.webp)

## Usage

`AssistedProvider` lends `show_table` on every page. There is nothing to set up. See [Show a table, a spec or a comparison](https://superassist.app/how-to/show-structured-answers.md).

## What the model sees

`show_table` is described as:

```txt wrap
Show the user a table: records of the same kind as rows, the fields they share as columns. For structured answers the user can scan, like a list of orders.
```

| Parameter | Type                                                                                       | Required |
| --------- | ------------------------------------------------------------------------------------------ | -------- |
| `title`   | `string`                                                                                   | No       |
| `columns` | One or more of `{ key: string; label: string }`                                            | Yes      |
| `rows`    | `Record<string, string \| number \| boolean \| null>[]`, each a row's values by column key | Yes      |

The call answers `Showed the user a table.` It changes nothing on the page.

## Props

None. The package renders it in place of the `show_table` call: the title, then the table with the title as its caption. Replace it with `cards.table` on `AssistedProvider`, see [Swap a card](https://superassist.app/how-to/swap-a-card.md). The card carries `data-slot="assisted-table"`.

## See also

- [Spec card](https://superassist.app/components/cards/spec-card.md) for one thing's properties.
- [Comparison card](https://superassist.app/components/cards/comparison-card.md) for two or three options side by side.
