# V fieldset 4

> Notification preferences fieldset

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

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

## Install

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

## Files

### `registry/default/variants/v-fieldset-4.tsx`

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

export default function Particle() {
  return (
    <Fieldset className="flex w-full max-w-sm flex-col gap-1">
      <FieldsetLegend className="mb-3">Notification Preferences</FieldsetLegend>
      <Field className="flex-row items-center justify-between rounded-lg border p-3">
        <div className="flex flex-col gap-0.5">
          <FieldLabel className="cursor-pointer text-sm">
            Email notifications
          </FieldLabel>
          <FieldDescription className="text-xs">
            Receive updates and alerts by email.
          </FieldDescription>
        </div>
        <Switch defaultChecked />
      </Field>
      <Field className="flex-row items-center justify-between rounded-lg border p-3">
        <div className="flex flex-col gap-0.5">
          <FieldLabel className="cursor-pointer text-sm">
            Push notifications
          </FieldLabel>
          <FieldDescription className="text-xs">
            Get real-time alerts on your device.
          </FieldDescription>
        </div>
        <Switch />
      </Field>
      <Field className="flex-row items-center justify-between rounded-lg border p-3">
        <div className="flex flex-col gap-0.5">
          <FieldLabel className="cursor-pointer text-sm">
            Marketing emails
          </FieldLabel>
          <FieldDescription className="text-xs">
            News, promotions, and product updates.
          </FieldDescription>
        </div>
        <Switch />
      </Field>
    </Fieldset>
  );
}
```
