# Shadcn Sizes

> Switch in different sizes.

- Type: example, free and open source (MIT)
- Component: [Switch](https://reui.io/components/switch.md)
- Page: https://reui.io/components/switch/c-switch-4
- Docs (Base UI): https://ui.shadcn.com/docs/components/base/switch.md
- Docs (Radix UI): https://ui.shadcn.com/docs/components/radix/switch.md
- MCP: `get_example("c-switch-4")`
- Registry item: https://reui.io/r/styles/base-nova/c-switch-4.json
- Uses: Label, Switch

## Best for

The sm and default sizes stacked for comparison, to match the control to dense or regular rows

## Agent notes

- `size` on `Switch` accepts only sm and default; no larger size ships with the component

## Install

```bash
npx shadcn@latest add @reui/c-switch-4
```

## About Shadcn Switch

### When to use

- Single on or off preferences beside a label, such as airplane mode, sign in security or an AI feature
- Grouped notification, privacy and editor preferences in a card, a Frame panel or a dense list
- Options with a supporting sentence set as clickable tiles, including a risky one that erases data

### When not to use

- A complete options page with account, security and notification sections ready to drop in: use the [Settings blocks](https://reui.io/blocks/application/settings.md)
- A row of pressed buttons that picks a view, an alignment or a time range: use [Toggle Group](https://reui.io/components/toggle-group.md) (`get_component("toggle-group")`)
- A consent or terms box that is ticked and sent along with a form: use [Checkbox](https://reui.io/components/checkbox.md) (`get_component("checkbox")`)

### Agent notes

- Every `Switch` here is uncontrolled, seeded by `defaultChecked` or left off, and nothing reads a flip back; control it to save the setting
- No example gives `Switch` a name, so a native form submit carries none of these values; add one when the switch sits inside a form

Every ReUI item has a twin like this one; the index is https://reui.io/llms.txt. Agents with the ReUI MCP (https://reui.io/docs/mcp) get the same guidance from the getters named above.
