# Radio Group

Use radio-group for mutually exclusive choices. Bind `value` on `Root` and pair items with labels
via matching `id` / `for`.

```svelte
<script lang="ts">
	import { Label } from '~/components/label';
	import * as RadioGroup from '~/components/radio-group';
</script>

<RadioGroup.Root value="comfortable">
	<div class="flex items-center space-x-2">
		<RadioGroup.Item value="default" id="r1" />
		<Label for="r1">Default</Label>
	</div>
	<div class="flex items-center space-x-2">
		<RadioGroup.Item value="comfortable" id="r2" />
		<Label for="r2">Comfortable</Label>
	</div>
	<div class="flex items-center space-x-2">
		<RadioGroup.Item value="compact" id="r3" />
		<Label for="r3">Compact</Label>
	</div>
</RadioGroup.Root>
```