# Radio Group A set of mutually exclusive options presented as radio buttons. ## Installation Start from a Svelte 5 application, then install the component package, shared theme, and Bits UI peer: ```bash pnpm add coss-svelte @coss-svelte/theme bits-ui ``` Import `@coss-svelte/theme/style-coss.css` after Tailwind from the application's global stylesheet. ## Usage ```svelte Next.js Vite Astro ``` ## Anatomy - `RadioGroup` - `RadioGroupItem` ## API Reference ### RadioGroup A set of mutually exclusive options presented as radio buttons. | Prop | Type | Default | Description | | --- | --- | --- | --- | | `bind:value` | `string` | `""` | Current value for the component. Bind with `bind:value` when supported. | | `label` | `string` | `""` | Accessible label or fallback visible label for the control. | | `options` | `Option[]` | `[]` | Options rendered by the component's built-in fallback composition. | | `orientation` | `Orientation` | `"vertical"` | Layout direction for the component. | **Composition and refs** - `children: Snippet<[]>` - `bind:ref: HTMLElement \| null` Inherits from [Bits UI RadioGroup.Root](https://bits-ui.com/docs/components/radio-group#root). ### RadioGroupItem Renders one item inside a toolbar group. **Composition and refs** - `children: Snippet<[RadioGroupItemSnippetProps]>` - `bind:ref: HTMLElement \| null` Inherits from [Bits UI RadioGroup.Item](https://bits-ui.com/docs/components/radio-group#item). ## Implementation Details | Field | Value | | --- | --- | | Status | Stable | | Foundation | bits | | Category | Toggle & Choice | | Particles | 6 | ## Status Stable for the current coss-svelte surface. ## Agent Notes - Import Svelte exports directly from `coss-svelte`. - This is Svelte 5 code: use `class`, lowercase event properties, runes, snippets, and documented `bind:*` contracts. Do not emit JSX, React hooks, `className`, `asChild`, or Base UI imports. - Prefer this route's example and generated API table over React COSS snippets; COSS React particles are design references only. - The copy-and-own registry is a preview. Inspect `/r/radio-group.json` for the complete local file and dependency closure. - Radio Group is stable in the current source catalog.