Skip to main content

Function: Switch()

Switch(__namedParameters): any

Defined in: components/Switch/Switch.tsx:149

A semantic on/off toggle built on React Aria's Switch.

Entity = Selection → reads vars.colors.input.primary.*, radii: round (pill track + circular thumb), border: outline.control, sizing: hit.base, motion: feedback.

Parameters

ParameterType
__namedParametersSwitchProps

Returns

any

Example

<Switch>Enable notifications</Switch>
<Switch defaultSelected>Dark mode</Switch>