ZAO造

Table

An open, monochrome reading plane with precise columns and one grounded frame.

Preview

Su uses the Quiet instrument direction. Use the mode switcher above to see light and dark.

Recent requests

6 requests
Six operations requests. Sort by Request or Items, then select requests to compare.
IDOwnerStatus
Access reviewREQ-01Il10Lin Chen24Ready
Usage summaryREQ-2048Mara Wu1,084Running
Policy updateREQ-0137Noah Park8Needs review
Archive exportREQ-0962Iris Hale306Blocked
Membership syncREQ-1032Lin Chen24Ready
Storage auditREQ-1186Mara Wu52Needs review

0 of 6 requests selected

Loading

Local simulation. Keep the last-known rows while data arrives; pass placeholder rows with the expected shape when there is no prior content.

RecordOwnerItems
Photo libraryLin Chen182
Archive exportMara Wu96
Workspace filesNoah Park62

Usage

  • Use a table when the same attributes repeat across records and people need to compare their values. Let the primary column lead; keep IDs and supporting metadata subordinate.
  • Compose native table parts inside Root. Give the table an aria-label and use Caption for additional context. Use scope="row" on the primary cell when it names the record.
  • Set numeric on number columns to align comparable values and use tabular figures. Keep units in the heading or alongside the value.
  • Keep records on one steady reading plane. Sorting, selection, and actions belong to explicit buttons, checkboxes, and menus; the table does not manage their state.
  • For sorting, put a Button in the column heading and set aria-sort on the sorted Head. For selection, use labeled checkboxes and a visible selected count. Keep the main action visible outside the frame.
  • Give the primary column the available width. Keep supporting columns compact, use monospace IDs, and match the type-label role across static and sortable headings. Reserve space for sort indicators so columns stay steady.
  • Pair each written status with a distinct decorative Iconoir glyph in the default foreground: a check for Ready, play for Running, warning triangle for Needs review, and prohibition for Blocked. Keep the text as the accessible reading; color and motion are unnecessary. The specimen retains neutral checkbox selection and a compact secondary action toolbar. Metadata gains default foreground on emphasized rows; the selected count stays concise, with a detailed live announcement for assistive technology.

API

PropValuesDefault
Root aria-labelstringrequired
Root classNameouter frame layout classes—
Root tableClassNamenative table classes—
Root drawing / drawingLabelboolean / stringfalse / Loading
Captionnative caption props—
Header / Body / Footernative table section props—
Row selectedboolean; visual selectionfalse
Head scopecol | row | colgroup | rowgroupcol
Head aria-sortascending | descending | none | other—
Head / Cell numericbooleanfalse
native props / refattributes and refs for each native element—

Example

import { Table } from '@zao/react';

<Table.Root aria-label="Recent requests">
  <Table.Header>
    <Table.Row>
      <Table.Head>Request</Table.Head>
      <Table.Head numeric>Items</Table.Head>
    </Table.Row>
  </Table.Header>
  <Table.Body>
    <Table.Row>
      <Table.Head scope="row">Access review</Table.Head>
      <Table.Cell numeric>24</Table.Cell>
    </Table.Row>
  </Table.Body>
</Table.Root>

Accessibility

Table preserves native table, row, column header, row header, and cell semantics. Head defaults to scope="col"; use scope="row" for record names. Root provides a named, keyboard focusable horizontal scroll region for narrow layouts. Readable status text, labeled native checkboxes, aria-sort on the active heading, and visible action focus support the specimen’s read, sort, and select workflow. Table does not add grid navigation or editable spreadsheet behavior.