SettingsRow
SettingsRow — label + description on one side, an arbitrary trailing control (Switch, Select, Button, Badge, ...) on the other. This is the shared layout behind every settings/preferences list row; see `ToggleRow` for the common label+description+Switch case pre-wired.
packages/ui/src/components/patterns/settings-row.tsx
Import
Subpath export:
@marktiderman/genesis-ui/patternsimport { SettingsRow } from "@marktiderman/genesis-ui/patterns";Components
Auto-generated from TypeScript source via
react-docgen-typescript.SettingsRow
SettingsRow — label + description on one side, an arbitrary trailing control (Switch, Select, Button, Badge, ...) on the other. This is the shared layout behind every settings/preferences list row; see `ToggleRow` for the common label+description+Switch case pre-wired.
| Prop | Type | Default | Description |
|---|---|---|---|
| label* | ReactNode | — | Row label. |
| children | ReactNode | — | Control(s) rendered on the trailing side. |
| className | string | — | |
| description | ReactNode | — | Supporting copy shown under the label, muted. |
| descriptionId | string | — | `id` applied to the description paragraph so the trailing control can point at it with `aria-describedby` — otherwise the description is an unrelated `<p>` that a screen reader skips while navigating controls. `ToggleRow` wires this automatically; pass it yourself when supplying your own control. |
| disabled | boolean | — | Marks the row disabled: the label steps down to the muted colour and the row carries `data-disabled`. The text keeps its contrast (it isn't faded with opacity); the control it wraps dims itself. |
| htmlFor | string | — | `id` of the control this row labels (e.g. a Switch), for a11y and click-to-focus. Supply it whenever the trailing control is labelable — the label text is then a real `<label for>`. Omit it for rows whose control names itself (a Button) or has none (a Badge); the text renders as a plain `<span>` rather than a `<label>` associated with nothing. |
| testID | string | — | Stable test/automation selector (emitted as `data-testid`). |