Skip to content
Back to skills

Radio

ASecurity

Radio button with animated indicator and label. Use standalone or inside RadioGroup for managed selection.

  • 4 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 27, 2026
data-aitypescriptreactnode

Works with

  • cli

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add reaviz/skills --skill radio --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Radio?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Radio
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/reaviz-radio/badge)](https://www.skillsdirectory.com/skills/reaviz-radio)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Radio

Radio button with animated indicator and label. Use standalone or inside RadioGroup for managed selection.

## Import

```tsx
import { Radio, RadioGroup } from 'reablocks';
```

## Radio Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `checked` | `boolean` | — | Whether checked (standalone use; managed by RadioGroup) |
| `value` | `any` | — | Value passed to RadioGroup on selection |
| `label` | `string \| ReactNode` | — | Label text or element |
| `disabled` | `boolean` | — | Disable the radio |
| `size` | `'small' \| 'medium' \| 'large'` | `'medium'` | Radio size |
| `onChange` | `(value: boolean) => void` | — | Change handler |
| `onBlur` | `(event: FocusEvent) => void` | — | Blur handler |
| `className` | `string` | — | Additional CSS classes |
| `theme` | `RadioTheme` | — | Per-instance theme override |

Renders with `role="radio"`, `aria-checked`, keyboard support (Space).

## Standalone Usage

```tsx
const [checked, setChecked] = useState(false);
<Radio checked={checked} label="Option A" onChange={setChecked} />
```

## RadioGroup

Manages selection across multiple Radio buttons via React Context.

### RadioGroup Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `selectedValue` | `any` | — | Currently selected value |
| `onChange` | `(value: any) => void` | — | Selection change handler |
| `className` | `string` | — | Container CSS classes |
| `children` | `ReactNode` | — | Radio elements |

### RadioGroup Usage

```tsx
const [value, setValue] = useState('option1');

<RadioGroup selectedValue={value} onChange={setValue}>
  <Radio value="option1" label="Option 1" />
  <Radio value="option2" label="Option 2" />
  <Radio value="option3" label="Option 3" />
</RadioGroup>
```

When inside a RadioGroup, each Radio's `checked` state is determined by comparing its `value` to the group's `selectedValue`.

## RadioTheme Interface

```typescript
interface RadioTheme {
  base: string;
  radio: { base: string; disabled: string; checked: string };
  indicator: {
    base: string;
    disabled: string;
    sizes: { small, medium, large };
  };
  label: { base: string; clickable: string; checked: string; disabled: string };
  sizes: { small, medium, large };
}
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in data-ai →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.