data-display/DSListRow
DSListRow
data-displayStandard list row with leading icon, title, optional subtitle, badge, and a trailing action.
iOS 17+macOS 14+
Purpose
Settings rows, navigation links, and entity lists.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| icon | String? | nil | Leading SF Symbol. |
| iconColor | Color | DSColor.primary | Icon background colour. |
| titlereq | String | โ | Row title. |
| subtitle | String? | nil | Secondary text below the title. |
| badge | String? | nil | Trailing badge label. |
| action | (() -> Void)? | nil | Row tap action. |
Examples
Settings list
Typical iOS settings section.
swift
DSListRow(icon: "bell.fill", iconColor: DSColor.primary, title: "Notifications", badge: "3") {
navigate(.notifications)
}
DSListRow(icon: "lock.fill", iconColor: DSColor.secondary, title: "Privacy & Security") {
navigate(.privacy)
}