# Radio Group Layout 1 - Horizontal

> Horizontal RadioGroup.

A shadcn/ui block from the [@shadcnblocks](https://shadcnblocks.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/shadcnblocks/radio-group-radio-group-layout-1).

- Page, with a live preview: https://shadcn.exchange/r/shadcnblocks/radio-group-radio-group-layout-1
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/shadcnblocks/radio-group-radio-group-layout-1-light-6a7585822e5dc7aa.png
- Registry item: https://shadcnblocks.com/r/radio-group-radio-group-layout-1.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://shadcnblocks.com/r/radio-group-radio-group-layout-1.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: `label`, `radio-group`

## Files

### `example/radio-group/radio-group-layout-1.tsx`

```tsx
import { Label } from "@/components/ui/label";
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";

export const title = "Horizontal RadioGroup";

const Example = () => (
  <RadioGroup className="flex flex-row space-x-4" defaultValue="option-1">
    <div className="flex items-center space-x-2">
      <RadioGroupItem id="h1" value="option-1" />
      <Label htmlFor="h1">Option 1</Label>
    </div>
    <div className="flex items-center space-x-2">
      <RadioGroupItem id="h2" value="option-2" />
      <Label htmlFor="h2">Option 2</Label>
    </div>
    <div className="flex items-center space-x-2">
      <RadioGroupItem id="h3" value="option-3" />
      <Label htmlFor="h3">Option 3</Label>
    </div>
  </RadioGroup>
);

export default Example;
```
