data-display/DSTable
DSTable
data-displayGeneric data table with column headers, alternating row tint, hover effect, and row selection support.
iOS 17+macOS 14+
Purpose
Structured data in admin panels, dashboards, and macOS apps.
Interactive Reference
Live showroom
Need the full visual surface?
Screenshots do not scale well across every component, state, and variant. For the real interactive reference, import the package and launch DSShowcaseRoot().
Best for exploring:
variants, states, categories, and real app examples in one place.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| columnsreq | [DSTableColumn<T>] | — | Column definitions with title and key path. |
| rowsreq | [T] | — | Array of data items. |
| onSelect | ((T) -> Void)? | nil | Row tap handler. |
Examples
User table
User list with name, email, and role.
swift
DSTable(
columns: [
DSTableColumn(title: "Name", keyPath: \.name),
DSTableColumn(title: "Email", keyPath: \.email),
DSTableColumn(title: "Role", keyPath: \.role),
],
rows: viewModel.users,
onSelect: { user in navigate(.userDetail(user)) }
)