# V field 18

> Field with switch toggle

A shadcn/ui block from the [@cnippet](https://ui.cnippet.dev/) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/cnippet/v-field-18).

- Page, with a live preview: https://shadcn.exchange/r/cnippet/v-field-18
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/cnippet/v-field-18-light-882cc9c0ef3f1656.png
- Registry item: https://ui.cnippet.dev/r/v-field-18.json
- Categories: field
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://ui.cnippet.dev/r/v-field-18.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: `@cnippet/field`

## Files

### `registry/default/variants/v-field-18.tsx`

```tsx
import {
  Field,
  FieldDescription,
  FieldLabel,
} from "@/registry/default/ui/field";
import { Switch } from "@/registry/default/ui/switch";

export default function Particle() {
  return (
    <Field className="flex-row items-center justify-between rounded-lg border p-4">
      <div className="flex flex-col gap-1">
        <FieldLabel className="cursor-pointer">Marketing emails</FieldLabel>
        <FieldDescription>
          Receive emails about new products, features, and updates.
        </FieldDescription>
      </div>
      <Switch />
    </Field>
  );
}
```
