# V radio group 6

> With Legend

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

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

## Install

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

## Files

### `registry/default/variants/v-radio-group-6.tsx`

```tsx
import { Field, FieldLabel } from "@/registry/default/ui/field";
import { Fieldset, FieldsetLegend } from "@/registry/default/ui/fieldset";
import { RadioGroup, RadioGroupItem } from "@/registry/default/ui/radio-group";

export function Pattern() {
  return (
    <Fieldset className="w-full max-w-xs">
      <FieldsetLegend>Battery Level</FieldsetLegend>
      <RadioGroup defaultValue="medium">
        <Field className="flex-row">
          <RadioGroupItem id="battery-high" value="high" />
          <FieldLabel htmlFor="battery-high">High</FieldLabel>
        </Field>
        <Field className="flex-row">
          <RadioGroupItem id="battery-medium" value="medium" />
          <FieldLabel htmlFor="battery-medium">Medium</FieldLabel>
        </Field>
        <Field className="flex-row">
          <RadioGroupItem id="battery-low" value="low" />
          <FieldLabel htmlFor="battery-low">Low</FieldLabel>
        </Field>
      </RadioGroup>
    </Fieldset>
  );
}
```
