Installation
tokens.css + data-table.css + button.csshead.html
<link rel="stylesheet" href="tokens.css">
<link rel="stylesheet" href="components/data-table/data-table.css">Records
Preview
| Name | Status |
|---|---|
| Acme | open |
1 record
Code
data-table.html
<div class="au-records au-data-table" data-au-component="data-table" data-au-mode="records" aria-label="Records"><table><thead><tr><th>Name</th><th>Status</th></tr></thead><tbody><tr><td>Acme</td><td><span class="au-records__tag">open</span></td></tr></tbody></table><p class="au-records__foot">1 record</p></div>Filter
Preview
| Item | Status |
|---|---|
| Refund | open |
Code
data-table.html
<div class="au-filter-bar" role="group" aria-label="Filter"><button type="button" class="au-btn au-btn--ghost au-btn--sm" aria-pressed="true">All</button><button type="button" class="au-btn au-btn--ghost au-btn--sm" aria-pressed="false">Open</button></div><div class="au-filter-table" data-au-component="data-table" data-au-mode="filter"><table><thead><tr><th>Item</th><th>Status</th></tr></thead><tbody><tr data-au-status="open"><td>Refund</td><td>open</td></tr></tbody></table></div>Diff cells
Preview
Proposed edits
| Field | Value |
|---|---|
| note | added |
| legacy | removed |
Code
data-table.html
<div class="au-diff-table" data-au-component="data-table" data-au-mode="diff"><h3 class="au-diff-table__title">Proposed edits</h3><table><thead><tr><th>Field</th><th>Value</th></tr></thead><tbody><tr data-au-change="add"><td>note</td><td>added</td></tr><tr data-au-change="del"><td>legacy</td><td>removed</td></tr></tbody></table></div>Component contract
- Install
- tokens.css · data-table.css · button.css
- States
- Host-owned via data-au-state and documented variants
- Host
- content, state transitions, and execution behind actions
For agents
data-table.contract
# agent-ui / data-table
component: data-table
selector: .au-data-table
data_au_component: data-table
purpose: Records, filter, and diff-cell table modes (absorbs records/filter/diff tables).
install:
- tokens.css
- data-table.css
- button.css when rendering filter chips
states: Host-owned via data-au-state and documented variants.
css_variables: Uses shared semantic tokens.
events: native form, focus, and click only — no custom events or runtime required
no_javascript: Markup and native controls remain usable without script.
host_owns: The host owns content, state transitions, and execution behind actions.
accessibility: Prefer labelled regions and text status, not color alone.
security: Escape untrusted model and tool text before insertion.
rules:
- Host owns execution, authorization, persistence, validation, and state transitions.
- Components render host-provided state; they never execute tools or imply approval.
- Escape untrusted model output, tool args, and tool output before insertion.
- Use only documented data-au-* attributes and data-au-state values.
- Keep the no-JS path usable. Do not add React, Tailwind, bundlers, or remote assets.
source: components/data-table/data-table.{html,css} + README.md + fixture.html