# Switch [component-header:sl-switch] Switches allow the user to toggle an option on or off. ```html preview Switch ``` ```jsx react import { SlSwitch } from '@shoelace-style/shoelace/dist/react'; const App = () => ( Switch ); ``` ?> This component doesn't work with standard forms. Use [``](/components/form) instead. ## Examples ### Checked Use the `checked` attribute to activate the switch. ```html preview Checked ``` ```jsx react import { SlSwitch } from '@shoelace-style/shoelace/dist/react'; const App = () => ( Checked ); ``` ### Disabled Use the `disabled` attribute to disable the switch. ```html preview Disabled ``` ```jsx react import { SlSwitch } from '@shoelace-style/shoelace/dist/react'; const App = () => ( Disabled ); ``` ### Custom Size Use the available custom properties to make the switch a different size. ```html preview ``` ```jsx react import { SlSwitch } from '@shoelace-style/shoelace/dist/react'; const App = () => ( ); ``` [component-metadata:sl-switch]