# Table block

> Displays structured information in a simple table. For sorting, filtering, paging or buttons, use a [data table block](/docs/developers/block-kit/blocks/data-table-block).

Displays structured information in a simple table. For sorting, filtering, paging or buttons, use a [data table block](https://workstation.repzo.com/docs/developers/block-kit/blocks/data-table-block).

| | |
|---|---|
| **Type** | `table` |
| **Available in** | Messages, Modals, Home tab |

## Usage

The first row is shown as the header. Cells are `raw_text` (`{ "type": "raw_text", "text": "…" }`), `raw_number` (`{ "type": "raw_number", "value": 12, "text": "12" }`) or [`rich_text`](https://workstation.repzo.com/docs/developers/block-kit/blocks/rich-text-block) for formatted text, links, emoji and mentions.

## Fields

| Field | Type | Description | Required? |
|---|---|---|---|
| `type` | String | The type of block. For a table block, `type` is always `table`. | Required |
| `block_id` | String | A unique identifier for the block. Maximum length is 255 characters. It must be unique within the message or view — a duplicate is replaced and reported as a warning. | Optional |
| `rows` | Object[] | An array of rows, each an array of cells. Maximum 100 rows and 20 cells per row. | Required |
| `column_settings` | Object[] | Per-column settings, in column order; use `null` to skip a column. Each item may set `align` (`left`, `center` or `right`, default `left`) and `is_wrapped` (Boolean). Columns without an item keep the defaults. Maximum 20 items. | Optional |

> **How Repzo Chat differs from Slack**
>
> - Slack shows tables in messages and the Home tab. Repzo shows them in modals too.
> - `is_wrapped` is accepted, but body cells always wrap and header cells never do.
> - A `raw_number` cell shows its `text` — always include it.
> - The 10,000-character limit isn't checked.

## Examples

### A price list with right-aligned numbers

```json
{
  "blocks": [
    {
      "type": "table",
      "column_settings": [
        null,
        {
          "align": "right"
        },
        {
          "align": "right"
        }
      ],
      "rows": [
        [
          {
            "type": "raw_text",
            "text": "Product"
          },
          {
            "type": "raw_text",
            "text": "Unit price (SAR)"
          },
          {
            "type": "raw_text",
            "text": "In stock"
          }
        ],
        [
          {
            "type": "raw_text",
            "text": "POS Terminal X2"
          },
          {
            "type": "raw_number",
            "value": 2450,
            "text": "2,450"
          },
          {
            "type": "raw_number",
            "value": 64,
            "text": "64"
          }
        ],
        [
          {
            "type": "raw_text",
            "text": "Thermal receipt printer"
          },
          {
            "type": "raw_number",
            "value": 650,
            "text": "650"
          },
          {
            "type": "raw_number",
            "value": 120,
            "text": "120"
          }
        ],
        [
          {
            "type": "rich_text",
            "elements": [
              {
                "type": "rich_text_section",
                "elements": [
                  {
                    "type": "link",
                    "url": "https://example.com/products/SCN-2D",
                    "text": "Wireless barcode scanner"
                  }
                ]
              }
            ]
          },
          {
            "type": "raw_number",
            "value": 420,
            "text": "420"
          },
          {
            "type": "raw_number",
            "value": 0,
            "text": "0"
          }
        ]
      ]
    }
  ]
}
```

## Related

- [Blocks](https://workstation.repzo.com/docs/developers/block-kit/blocks)
- [Block Kit overview](https://workstation.repzo.com/docs/developers/block-kit)
