Skip to content

Switch

Switch ​

jsx
import Switch from '@semcore/ui/switch';
<Switch />;

NSSwitch.Props ​

& & {...}
NameTypeDescription
size"m" | "l" | "xl" Switch size
theme Switch theme
disabledboolean Disabled state

Switch.Value ​

jsx
import Switch from '@semcore/ui/switch';
<Switch.Value />;

NSSwitch.Value.Props ​

& & {...}
NameTypeDescription
onChange(checked: boolean, e: ) => void Handler on change
checkedboolean Control state
defaultCheckedboolean Initial state for uncontrolled mode
includeInputPropsstring[] The list of properties that can be placed in the hidden input
theme Switch theme

Switch.Addon ​

jsx
import Switch from '@semcore/ui/switch';
<Switch.Addon />;

NSSwitch.Addon.Props ​

&

Released under the MIT License.

Released under the MIT License.