Component

Toggles / Switch

Use toggles for binary settings that take immediate effect. Nexus provides Toggle for Desktop/Tablet and MobileToggle for Mobile Application, both wired to the --components-toggle-switch-* tokens.

Storybook
Playground
Value
State
Size
Show Icon
Container
Label text
Helper content
Helper text
Preview
JSX
<Toggle
  value={false}
  size="sm"
  label="Toggle/Switch Title"
  helperText="Helper text write here..."
  onChange={(val) => setValue(val)}
/>

Props

The full Toggle API for Desktop / Tablet.

PropTypeDefaultDescription
valueRequired
booleanToggle state — off (false) or on (true)
size
"sm" | "md""sm"Track and knob dimensions
type
"default" | "hover" | "focus" | "disable""default"Interaction state
label
string"Toggle/Switch Title"Label title displayed to the right of the toggle
showIcon
booleantrueShow / hide the toggle control (track + knob) itself
showToggleContainer
booleantrueShow / hide the label + helper text container
showHelperContent
booleantrueShow / hide the helper text
helperText
string"Helper text write here..."Supporting helper text below the label
onChange
(value: boolean) => voidCalled with the new boolean value on toggle