# Switch

A simple switch component.

## Usage <a href="#usage" id="usage"></a>

```jsx
import React, { useState } from 'react'
import { Switch } from '@aragon/ui'

const App = () => {
  const [checked, setChecked] = useState(false)
  return <Switch checked={checked} onChange={setChecked} />
}
```

## Demonstration

![](https://1303901111-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqkA65ZBta5cBbldyxyst%2Fuploads%2Fgit-blob-f749a0d09e20a7df33122a9fb4f747be1f7aa9cc%2FSchermata%202022-06-25%20alle%2023.00.03.png?alt=media)

## Props <a href="#props" id="props"></a>

#### `checked` <a href="#checked" id="checked"></a>

| TYPE      | DEFAULT VALUE |
| --------- | ------------- |
| `Boolean` | `false`       |

#### `disabled` <a href="#disabled" id="disabled"></a>

| TYPE      | DEFAULT VALUE |
| --------- | ------------- |
| `Boolean` | `false`       |

#### `onChange` <a href="#onchange" id="onchange"></a>

| TYPE                                  | DEFAULT VALUE |
| ------------------------------------- | ------------- |
| `Function`: `(checked: Boolean) -> *` | `() => {}`    |
