Genesis
@beta

ToggleRow

ToggleRow — `SettingsRow` pre-wired with a `Switch`: the common label+description+on/off row for settings and preferences UI. Both halves of the row's text are wired to the control: the label via `id`/`htmlFor`, and the description via `aria-describedby`, so a screen reader focusing the switch hears the constraint ("this will notify all team members") rather than skipping it.

packages/ui/src/components/patterns/toggle-row.tsx

Import
Subpath export: @marktiderman/genesis-ui/patterns
import { ToggleRow } from "@marktiderman/genesis-ui/patterns";
Components
Auto-generated from TypeScript source via react-docgen-typescript.

ToggleRow

ToggleRow — `SettingsRow` pre-wired with a `Switch`: the common label+description+on/off row for settings and preferences UI. Both halves of the row's text are wired to the control: the label via `id`/`htmlFor`, and the description via `aria-describedby`, so a screen reader focusing the switch hears the constraint ("this will notify all team members") rather than skipping it.

PropTypeDefaultDescription
label*ReactNode—
checkedboolean—
classNamestring—
defaultCheckedboolean—
descriptionReactNode—
disabledboolean—
idstring—Switch/label `id`. Auto-generated via `useId` when omitted.
onCheckedChange((checked: boolean) => void)—
rowTestIDstring—Stable test/automation selector for the row wrapper.
testIDstring—Stable test/automation selector for the **Switch** — emitted as `data-testid` on the control itself, since that is the node automation has to click to toggle. Use `rowTestID` to select the surrounding row.
Storybook
Storybook hosts the canonical visual reference with controls for every variant.