screens/DSSettingsRow
DSSettingsRow
screensSettings row with a coloured icon square, title, optional subtitle, and a right-side control (chevron, toggle, or custom view).
iOS 17+
Purpose
Primary building block for settings screens on iOS.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| iconreq | String | — | SF Symbol. |
| iconColorreq | Color | — | Icon container background. |
| titlereq | String | — | Row label. |
| subtitle | String? | nil | Secondary line. |
| control | DSSettingsControl | .disclosure | .disclosure, .toggle(Binding<Bool>), .value(String), .custom(AnyView). |
| action | (() -> Void)? | nil | Row tap action. |
Examples
App settings
Typical iOS settings section.
swift
DSSection("General") {
DSSettingsRow(icon: "bell.fill", iconColor: .red, title: "Notifications", control: .disclosure) { navigate(.notifications) }
DSSettingsRow(icon: "moon.fill", iconColor: .indigo, title: "Dark Mode", control: .toggle($darkMode))
DSSettingsRow(icon: "globe", iconColor: .blue, title: "Language", control: .value("English")) { navigate(.language) }
}