---
title: "Radio"
description: "A single radio button with an associated label and optional error message."
canonical_url: "https://sanity-id-docs.sanity.build/sanity-id/components/radio"
md_url: "https://sanity-id-docs.sanity.build/sanity-id/components/radio.md"
docs_index: "https://sanity-id-docs.sanity.build/sanity-id/llms.txt"
version: "1.15.2"
---

> Part of the Sanity ID reference. The index of every page is at https://sanity-id-docs.sanity.build/sanity-id/llms.txt.

# Radio

A single radio button with an associated label and optional error message.

```tsx
import { Radio } from "@sanity/sanity-id/components/radio"
```

## Props

| Prop | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `id` | `string` | yes | — | Unique input ID; connects the input to its label element |
| `error` | `ReactNode` | no | — | Error message displayed below the radio button |
| `label` | `ReactNode` | no | — | Label displayed next to the radio button |

Also accepts every prop of `Omit<ComponentProps<"input">, "type">`.

## Usage

```tsx
import { Radio } from "@sanity/sanity-id/components/radio"

export default () => {
	return (
		<div className="flex flex-col gap-32 max-w-md">
			<Radio id="radio-example-1" label="Radio with label" />
			<Radio
				id="radio-example-4"
				label="Radio with label (checked)"
				defaultChecked
			/>
			<Radio
				id="radio-example-2"
				label="Radio with long label. Eu do voluptate minim qui culpa reprehenderit enim elit laboris eiusmod consectetur"
			/>
			<Radio
				id="radio-example-2"
				label="Radio with error"
				error="Esse dolor in nostrud elit incididunt voluptate"
			/>
			<Radio
				id="radio-example-5"
				label="Radio with error (checked)"
				error="Esse dolor in nostrud elit incididunt voluptate"
				defaultChecked
			/>
			<Radio
				id="radio-example-3"
				label="Radio with long error"
				error="Et et dolore ut excepteur voluptate incididunt commodo et minim cillum velit do officia. Sint cupidatat pariatur pariatur labore minim."
			/>
		</div>
	)
}
```

