# V radio group 7

> In Card With Description

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

- Page, with a live preview: https://shadcn.exchange/r/cnippet/v-radio-group-7
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/cnippet/v-radio-group-7-light-bb3ea771101cc680.png
- Registry item: https://ui.cnippet.dev/r/v-radio-group-7.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-7.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-7.tsx`

```tsx
"use client";

import { useState } from "react";
import { Card } from "@/registry/default/ui/card";
import { Radio, RadioGroup } from "@/registry/default/ui/radio-group";
import { Label } from "../ui/label";

export function Pattern() {
  const [selected, setSelected] = useState("r-1");

  return (
    <RadioGroup onValueChange={setSelected} value={selected}>
      <Card
        className={`flex flex-row items-start gap-2 rounded-lg p-3 transition-colors ${selected === "r-1" ? "bg-primary/20" : ""}`}
      >
        <Radio id="r-1" value="r-1" />
        <div className="flex flex-col gap-1">
          <Label htmlFor="r-1">Free</Label>
          <p className="text-muted-foreground text-xs">
            Basic features for personal use.
          </p>
        </div>
      </Card>
      <Card
        className={`flex flex-row items-start gap-2 rounded-lg p-3 transition-colors ${selected === "r-2" ? "bg-primary/20" : ""}`}
      >
        <Radio id="r-2" value="r-2" />
        <div className="flex flex-col gap-1">
          <Label htmlFor="r-2">Pro</Label>
          <p className="text-muted-foreground text-xs">
            Advanced tools for professionals.
          </p>
        </div>
      </Card>
    </RadioGroup>
  );
}
```
