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 CrestCompany Summit Crest LogisticsChannel OnlineRegion WestStatusReady Items 5Updated Jun 1Total $1,500 - Order
ORD-10001 Customer Beacon TechCompany Beacon Tech LabsChannel RetailRegion MidwestStatusReview Items 12Updated Jun 2Total $5,400 - Order
ORD-10002 Customer Horizon VenturesCompany Horizon Ventures GroupChannel WholesaleRegion NortheastStatusQueued Items 19Updated Jun 3Total $11,400 - Order
ORD-10003 Customer Vanguard SystemsCompany Vanguard Systems CorpChannel OnlineRegion SouthStatusReady Items 26Updated Jun 4Total $19,500 - Order
ORD-10004 Customer Zenith LogisticsCompany Zenith Logistics ServicesChannel RetailRegion WestStatusReview Items 33Updated Jun 5Total $29,700 - Order
ORD-10005 Customer Quantum EnergyCompany Quantum Energy GroupChannel WholesaleRegion MidwestStatusQueued Items 40Updated Jun 6Total $42,000