# Data table card

> Canonical HTML: https://screenrig.ai/docs/cards/table/

A clean signage table for leaderboards, schedules and price lists: formatted columns, a highlighted row, ranks, and pages that turn by themselves.

Category: Operations. Tags: Charts and gauges, Numbers and metrics, Offices and workplaces.

## Previews

![Data table](/cards/table/v1/screenshots/canvas-bloom.webp?sha=1c47e51c7815f1d23fea95617a593f0236ed99a46e0803e6b1c3e2a0a1fa5c3c)

Canvas

![Data table](/cards/table/v1/screenshots/corner-bloom.webp?sha=032e05b971f7a038afb217534a8f96aa4310998d96a9f3ddf4e100f83a4ffdfa)

Corner

![Data table](/cards/table/v1/screenshots/chip-bloom.webp?sha=9df77d961d3d74d846cbcaa35f6bda9e2d56108090466aab95ec00b813ce1fbf)

Chip

## Views and forms

Views: canvas, corner, chip. Canvas forms: landscape, portrait.

[Card views, themes and publishing](/docs/cards/). [Browse the gallery](/apps/#cards).

## Data and privacy

This card uses its configured properties and live card data.

## Properties

For theme, background, accent and position, see [Common properties](/docs/cards/#common-properties).

Set static properties in `params`. Bind `data` to a project card data key for live values; that document holds only dynamic properties. Without a data key, put the complete configuration in `params`. Nested rows describe the contents of their parent property.

### Static properties

| Name | Type | Default | Values and limits | Description |
| --- | --- | --- | --- | --- |
| `title` | string | `""` | maxLength: `60` |  |
| `columns` | array |  | minItems: `1`; maxItems: `8`; Required |  |
| `columns[].key` | string |  | maxLength: `40`; Required |  |
| `columns[].label` | string |  | maxLength: `30`; Required |  |
| `columns[].align` | string | `"auto"` | `"auto"`, `"left"`, `"right"`, `"center"` | auto puts numbers right and text left. |
| `columns[].format` | string | `"text"` | `"text"`, `"number"`, `"percent"`, `"currency"`, `"delta"` | percent shows the number as given with a % sign (12.5 -> 12.5%). |
| `columns[].decimals` | integer, null | `null` | minimum: `0`; maximum: `4` | null: number 0, percent 1, currency 2, delta 1. |
| `columns[].width` | number, null | `null` | minimum: `0.2`; maximum: `10` | Relative width; null sizes the column to its content. |
| `highlight` | integer, string, null | `null` |  | A row index after sorting (0 is the first), or the first column's value. |
| `striped` | boolean | `true` |  |  |
| `showRank` | boolean | `false` |  |  |
| `sortBy` | string | `""` | maxLength: `40` |  |
| `sortDesc` | boolean | `false` |  |  |
| `maxRows` | integer | `0` | minimum: `0`; maximum: `50` | Rows per page; 0 shows as many as fit. Pages turn on the wall clock. |
| `pageSeconds` | integer | `10` | minimum: `5`; maximum: `120` |  |
| `currency` | string | `"$"` | maxLength: `4` |  |

### Dynamic properties

| Name | Type | Default | Values and limits | Description |
| --- | --- | --- | --- | --- |
| `rows` | array |  | minItems: `1`; maxItems: `50`; Required |  |

## Canvas example

Add this item to a playlist page’s `primitives`. [Publish the playlist and assign a screen](/docs/cards/#publish-a-card-canvas).

```json
{
  "id": "table",
  "primitive": "card",
  "card": "table",
  "major": 1,
  "params": {
    "theme": "neomustard",
    "columns": [
      {
        "key": "Example",
        "label": "Example"
      }
    ]
  },
  "rect": {
    "x": 0,
    "y": 0,
    "width": 1920,
    "height": 1080
  },
  "layer": 0,
  "content_fit": "fill",
  "data": "table-main"
}
```

## Write live data

Create this document before showing the card, then replace it to update the screen without republishing. Use the same project as the playlist. Supply your API authorization through the environment; see [API authentication](/docs/authentication/).

```console
curl --request PUT "https://api.screenrig.ai/api/card-data/table-main" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "ScreenRig-Project: $SCREENRIG_PROJECT" \
  --header "Content-Type: application/json" \
  --data '{"document":{"rows":[{}]}}'
```
