---
title: "Switch"
description: "A control that allows the user to toggle between checked and not checked."
component: true
---

<ComponentExample name="switch-demo" />

## Usage

---

```tsx
import { Switch } from "@medusajs/ui"
```

```tsx
<Switch />
```

## API Reference

---

This component is based on the [Radix UI Switch](https://www.radix-ui.com/primitives/docs/components/switch) primitive.

<ComponentProps component="switch" />

## Examples

---

### Small

<ComponentExample name="switch-small" />

### Disabled

<ComponentExample name="switch-disabled" />

### Checked

<ComponentExample name="switch-checked" />

### Checked Disabled

<ComponentExample name="switch-checked-disabled" />
