# V switch 6

> Destructive switch with confirmation text

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

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

## Install

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

## Files

### `registry/default/variants/v-switch-6.tsx`

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

export function Pattern() {
  return (
    <div className="mx-auto w-full max-w-xs">
      <Field className="flex-row">
        <div className="space-y-2">
          <FieldLabel className="text-destructive" htmlFor="sw-danger ">
            Delete all data on sign out
          </FieldLabel>
          <FieldDescription>
            When enabled, all local data will be permanently removed when you
            sign out. This action cannot be undone.
          </FieldDescription>
        </div>
        <Switch className="data-checked:bg-destructive" id="sw-danger" />
      </Field>
    </div>
  );
}
```
