Skip to content

ToggleRow

A labeled Switch row for inline preference controls — simpler than SettingsRow (no icon, no accessory modes). Use inside cards, forms, or any context where a preference doesn’t need left-icon treatment or the full settings semantics.

When to use: Inline preferences inside a feature card, quick-toggle panels, compact boolean options in a form section.

When not to use: Settings screens with grouped rows — use SettingsRow + SettingsGroup. When you need a left icon — use SettingsRow with rightAccessory="switch".

import { ToggleRow } from '@/components';
<ToggleRow
label="Show completed tasks"
description="Completed items appear dimmed at the bottom"
value={showCompleted}
onValueChange={setShowCompleted}
/>
PropTypeDefaultDescription
labelstringPrimary label (required)
descriptionstringSecondary line below label
valuebooleanSwitch state (required)
onValueChange(value: boolean) => voidChange handler (required)
isDisabledbooleanfalsePrevents interaction
testIDstring
<Card padding="md" border>
<Heading level={3}>Display Options</Heading>
<ToggleRow
label="Compact view"
description="Show more items per screen"
value={compact}
onValueChange={setCompact}
/>
<ToggleRow
label="Show avatars"
value={avatars}
onValueChange={setAvatars}
/>
</Card>
  • SettingsRow — settings row with left icon and multiple accessory modes
  • Switch — bare switch atom