ComponentsUpdated
This component was updated in version x.y.z and received new functionality.
Code examples
A simple switch
<Switch />
Guidelines
Switches are a component you use to turn a given feature, service, or setting on or off. You can think of them as a slightly more explicit version of a checkbox.
Code
<Switch />
import { Switch } from "@vygruppen/spor-react";
Lets the user turn something on or off
Props
Name | Type | Required? | Description |
|---|---|---|---|
size | "sm" | "md" | "lg" | Default "md" | |
checked | boolean | ||
disabled | boolean | ||
invalid | boolean | ||
defaultChecked | boolean | ||
onCheckedChange | (details: CheckedChangeDetails) => void | ||
label | string | ||
name | string | ||
as | string | Effects the container for the Switch. |