# Switch API

## Root Props

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `variant` | `SwitchVariant` | `'primary'` | No | Visual variant of the checkbox, for theme or context switching. |
| `size` | `SwitchSize` | `'md'` | No | Size of the checkbox input and its visual marker. |
| `ref` | `Ref<HTMLLabelElement>` | — | No | Ref to the native label element. |

Also accepts all `<label>` attributes.

## Child Parts

- `SwitchInput`: native checked state and form participation.
- `SwitchIndicator`: visible switch surface.

### `SwitchInput`

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `ref` | `Ref<HTMLInputElement>` | — | No | Ref forwarded to the underlying native `<input>` element |

Also accepts all `<input>` attributes.

### `SwitchIndicator`

Also accepts all `<div>` attributes.

## Types

- `SwitchProps`
- `SwitchInputProps`
- `SwitchIndicatorProps`
- `SwitchVariant`
- `SwitchSize`

## State Model

- The visible root mostly provides size and variant context.
- Checked and disabled semantics typically live on `SwitchInput`.
- `useSwitchContext` is available for advanced wrappers and custom compositions.
