ShowcaseDocs and examples

The list renders the same table-owned data lifecycle: success shows rows, loading and error render the built-in state items, and an empty success result renders the empty state. All three share one base shape with a per-state modifier class and accent, so the --nat-table-list-state-* tokens restyle them together — this demo centers them, gives them a fixed height, and themes each accent. Fetching, retries, and error handling stay in the consuming app.

Minimal example

<!-- dataStatus drives the built-in loading, empty, and error list items. -->
<nat-table-surface>
  <nat-list [columns]="columns" [data]="rows()" [dataStatus]="dataStatus()" accessibleName="Orders" />
</nat-table-surface>
// component.ts — the consumer owns fetching, retries, and error handling;
// the list only renders the state you hand it.
protected readonly dataStatus = signal<NatTableDataStatus>(NAT_TABLE_DATA_STATUS.loading);
protected readonly rows = signal<Order[]>([]);

private async load(): Promise<void> {
  this.dataStatus.set(NAT_TABLE_DATA_STATUS.loading);

  try {
    this.rows.set(await this.api.fetchOrders());
    this.dataStatus.set(NAT_TABLE_DATA_STATUS.success);
  } catch {
    this.dataStatus.set(NAT_TABLE_DATA_STATUS.error);
  }
}
/* All three states share one base shape, so shared tokens restyle them
   together and each state keeps its own accent. */
nat-list {
  --nat-table-list-state-justify: center;
  --nat-table-list-state-min-height: 8rem;
  --nat-table-list-state-radius: 12px;
  --nat-table-list-state-background: rgb(0 0 0 / 2%);
  --nat-table-list-error-accent: #d14343;
}

Showing 6 items across 9 visible fields.

  • Order ORD-10000
    Customer Summit Crest
    Company Summit Crest Logistics
    Channel Online
    Region West
    Status Ready
    Items 5
    Updated Jun 1
    Total $1,500
  • Order ORD-10001
    Customer Beacon Tech
    Company Beacon Tech Labs
    Channel Retail
    Region Midwest
    Status Review
    Items 12
    Updated Jun 2
    Total $5,400
  • Order ORD-10002
    Customer Horizon Ventures
    Company Horizon Ventures Group
    Channel Wholesale
    Region Northeast
    Status Queued
    Items 19
    Updated Jun 3
    Total $11,400
  • Order ORD-10003
    Customer Vanguard Systems
    Company Vanguard Systems Corp
    Channel Online
    Region South
    Status Ready
    Items 26
    Updated Jun 4
    Total $19,500
  • Order ORD-10004
    Customer Zenith Logistics
    Company Zenith Logistics Services
    Channel Retail
    Region West
    Status Review
    Items 33
    Updated Jun 5
    Total $29,700
  • Order ORD-10005
    Customer Quantum Energy
    Company Quantum Energy Group
    Channel Wholesale
    Region Midwest
    Status Queued
    Items 40
    Updated Jun 6
    Total $42,000