# Table The table widget is a configurable data grid: typed columns, sorting, filtering, footer totals and inline editing — either static or bound to a data source. ## Live preview ## Embedding a preview in documentation Pages embed a live widget with the `` block. Without a body the widget self-seeds its default data, exactly like a freshly dropped widget: ```html ``` Pass JSON metadata as the block body to preview specific data: ```html { "title": "Deployments", "columns": [ ... ], "rows": [ ... ] } ``` `type` is any widget type key, and `height` is the preview height in pixels (160–900). ## Data-driven preview { "title": "Deployments", "columns": [ { "key": "env", "label": "Environment", "sortable": true }, { "key": "status", "label": "Status", "type": "badge", "badgeMap": { "ok": "#2e7d32", "fail": "#c62828" } }, { "key": "latency", "label": "Latency (ms)", "type": "number" } ], "rows": [ { "env": "dev", "status": "ok", "latency": 42 }, { "env": "staging", "status": "ok", "latency": 57 }, { "env": "production", "status": "fail", "latency": 380 } ] } ## Columns | Field | Meaning | | --- | --- | | `key` | Property read from each row | | `label` | Header text | | `type` | `auto`, `text`, `number`, `date`, `bool` or `badge` | | `align` | `left`, `center` or `right` (numbers are right-aligned by default) | | `width` | Fixed column width in pixels | | `sortable`, `hidden`, `frozen` | Interaction flags | | `format` | Number/date format applied to the cell | | `badgeMap` | Value → colour map used by `badge` columns | ## Presentation `display` toggles the grid chrome: `header`, `striped`, `borders`, `compact`, `rowNumbers`, `wrap`, `footerTotals` and `filterRow`.