# With description

> Label and helper description beside the switch.

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

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

## Install

```bash
npx shadcn@latest add https://ui.flexnative.com/r/switch-03.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`, `field`

## Files

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

```tsx
import {
  Field,
  FieldContent,
  FieldDescription,
  FieldLabel,
} from '@/components/ui/field'
import { Switch } from '@/components/ui/switch'

export function Switch03() {
  return (
    <Field orientation="horizontal" className="w-full max-w-sm">
      <FieldContent>
        <FieldLabel htmlFor="switch-03">Share usage data</FieldLabel>
        <FieldDescription>
          Help us improve the product with anonymous analytics.
        </FieldDescription>
      </FieldContent>
      <Switch id="switch-03" defaultChecked />
    </Field>
  )
}
```
