Radio
Single radio button with a slotted label; group multiple radios by shared name attribute.
Preview
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
checked | boolean | — | Whether this radio is selected. |
disabled | boolean | — | Disables the radio button. |
name | string | — | Group name shared across related radio buttons. |
value | string | — | Value emitted in the change event detail when this radio is selected. |
Installation
pura is copy-paste and dependency-free. Load the whole library, or just this component.
<link rel="stylesheet" href="/pura/tokens.css">
<script type="module" src="/pura/lib/radio.js"></script> import "./pura/lib/radio.js";