---
id: Switch
section: components
cssPrefix: pf-v6-c-switch
---## Examples
### Basic
```html
```
### Reverse (toggle on right)
```html
```
### Label and check icon
```html
```
### Without visible text label
```html
```
### Disabled
```html
```
## Documentation
### Overview
A switch is an alternative to the checkbox component.
Use a switch when your user needs to perform instantaneous actions without confirmation.
Use checkbox if your user has to perform additional steps for changes to become effective.
### Accessibility
| Attribute | Applied to | Outcome |
| -- | -- | -- |
| `aria-labelledby="..."` or `aria-label="..."` | `.pf-v6-c-switch__input` | Indicates the behavior of the switch. This label should never dynamically change, and should always describe the behavior of the switch when its checked state is true. If an additional text label is included with the switch besides `.pf-v6-c-switch__label`, then `aria-labelledby` can reference the `id` of this text, but it must be in addition to the text of `.pf-v6-c-switch__label`. If there is no visible text label provided, then an `aria-label` must be provided. **Required** |
| `for` | `