import Radio from '@precursor/radio';Example
import Radio from '@precursor/radio';
export default function Example() {
return (
<>
<Radio label="Light" name="mode" />
<Radio label="Dark" name="mode" />
</>
);
}
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
labelRequired | string | — | — |
size | "s" | "m" | "l" | 'm' | — |
className | string | — | — |
aria-describedby | string | — | — |
aria-invalid | boolean | — | — |
disabled | boolean | — | — |
id | string | — | — |
nameRequired | string | — | — |
type | InputTypes | — | — |
defaultValue | string | — | — |
value | string | — | — |
checked | boolean | — | — |
state | "success" | "error" | "warning" | — | — |
onChange | ChangeEventHandler<HTMLInputElement> | — | — |