# Sizes

> The sm and default sizes side-by-side.

A shadcn/ui block from the [@flx](https://ui.flexnative.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/flx/switch-04).

- Page, with a live preview: https://shadcn.exchange/r/flx/switch-04
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/flx/switch-04-light-2bd770a07cab2a63.png
- Registry item: https://ui.flexnative.com/r/switch-04.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://ui.flexnative.com/r/switch-04.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `switch`

## Files

### `registry/patterns/switch/switch-04.tsx`

```tsx
import { Switch } from '@/components/ui/switch'

export function Switch04() {
  return (
    <div className="flex items-center gap-6">
      <div className="flex flex-col items-center gap-2">
        <Switch size="sm" defaultChecked />
        <span className="text-muted-foreground text-xs">sm</span>
      </div>
      <div className="flex flex-col items-center gap-2">
        <Switch size="default" defaultChecked />
        <span className="text-muted-foreground text-xs">default</span>
      </div>
    </div>
  )
}
```
