Simal UI
Components

ToggleRow

A settings row: label and optional description on the left, switch pinned right.

Web-only — toggle-row.web.tsx has no native counterpart.

The whole row is the hit target, not just the switch, which is why the description is part of the component rather than something a caller stacks above it.

Import

import { ToggleRow } from '@simal/ui/nativewindui';

Props

PropValuesDefaultDescription
label"Two-factor authentication"The setting being toggled. Written as a noun, not a question.
description"Required for everyone with billing access."One line explaining the consequence of turning it on. Omit it when the label is already unambiguous.
disabledbooleanfalseBlocks interaction and dims the row. The switch keeps showing its real value.
soonbooleanfalseRenders a SOON badge beside the label. For settings that exist in the UI before they exist in the product.
valuetrueControlled. Pair with onValueChange or the switch will not move.
onValueChangeRequired. Receives the next boolean.

Examples

Stacked

Several rows stacked is the real usage — a settings card, not a lone switch.

Without Description

A row with no description collapses to a single line.

States

On this page