# Switch component for Stripe Apps Use Switches (similar to checkboxes) to indicate or control boolean values. # v8 > This is a v8 for when app-sdk-version is 8. View the full page at https://docs.stripe.com/stripe-apps/components/switch?app-sdk-version=8. To add the `Switch` component to your app: ```js import {Switch} from '@stripe/ui-extension-sdk/ui'; ``` A common use of Switches is for settings that you save immediately—in other words, `Switch` is rarely part of a larger form that needs to be submitted separately. Here’s a simple example of a `Switch`. ### Switch props | Property | Type | | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `autoFocus` | (Optional) `boolean | undefined` If `true`, React will focus the element on mount. | | `checked` | (Optional) `boolean | undefined` Controls whether the input is selected. When you pass this prop, you must also pass an `onChange` handler that updates the passed value. | | `defaultChecked` | (Optional) `boolean | undefined` Specifies the initial value that a user can change. | | `description` | (Optional) `string | undefined` Descriptive text that will be rendered adjacent to the control’s label. | | `disabled` | (Optional) `boolean | undefined` Sets whether or not the element should be disabled. Prevents selection. | | `error` | (Optional) `string | undefined` Error text that will be rendered below the control. | | `form` | (Optional) `string | undefined` Specifies the `id` of the `