---
title: React Switch Components
name: Switch
description: Create consistent cross-browser and cross-device switch component.
route: /forms/switch/
other_frameworks: switch
---

## About

React Switch Components are a type of UI component that allows users to toggle between two states, usually represented as "on" or "off", "enabled" or "disabled", or "checked" or "unchecked".

When a user interacts with the component by clicking or tapping on it, the switch toggles its state, triggering an action or changing the appearance of the component. This type of component is often used in forms, settings panels, and other places where users need to turn something on or off or choose between two options.

## Example

<ExampleSnippet component="FormSwitchExample" componentName="React Switch Input" />

## Sizing

Larger or smaller react switches? Add `size="lg"` or `size="xl"` for additional sizes.

<ExampleSnippet component="FormSwitchSizingExample" componentName="React Switch Input" />

## Reverse 

Put your switches on the opposite side by adding `reverse` boolean property.

<ExampleSnippet component="FormSwitchReverseExample" componentName="React Switch Input" />

## API

Check out the documentation below for a comprehensive guide to all the props you can use with the components mentioned here.

- [&lt;CFormSwitch /&gt;](./api/#cformswitch)
