Component Catalog

Table

Structured tabular data display with typed columns, alignment, and automatic TanStack Table integration.

Table

A data table for presenting structured information — maps to Nuxt UI's UTable (powered by TanStack Table).

The Table component uses a simplified column format that AI agents can easily generate. Columns are defined with key, label, and optional align — A2NUI automatically converts these to TanStack ColumnDef objects at render time.

A2UI → Nuxt UI Mapping

A2UI PropertyNuxt UI PropNotes
columnscolumns (TanStack ColumnDef)Simplified { key, label, align } auto-converted
rowsdataArray of objects — keys match column key values
captionrendered as <p>Description text above the table
stickystickySticky header for scrollable content

Example JSONL

{"version":"v0.10","createSurface":{"surfaceId":"table_demo","catalogId":"standard"}}
{"version":"v0.10","updateComponents":{"surfaceId":"table_demo","components":[
  {"id":"root","component":"Table","columns":[
    {"key":"name","label":"Name","align":"left"},
    {"key":"role","label":"Role","align":"left"},
    {"key":"status","label":"Status","align":"center"}
  ],"rows":[
    {"name":"Elísabet Jónsdóttir","role":"Lead Therapist","status":"Active"},
    {"name":"Ólafur Magnússon","role":"Receptionist","status":"Active"},
    {"name":"Sigrún Einarsdóttir","role":"Therapist","status":"On Leave"}
  ]}
]}}

Properties

PropertyTypeRequiredDefaultDescription
columnsArray<{ key, label, align? }>YesColumn definitions
rowsArray<Record<string, unknown>>YesTable data
captionstringNoDescription shown above the table
stickybooleanNofalseSticky table header

Column Object

FieldTypeRequiredDescription
keystringYesThe property name in each row object
labelstringYesDisplayed column header text
alignleft | center | rightNoText alignment for header and cells

Try It

Paste the JSONL above into the Playground to see it render.