RadioGroup
One choice from a few.
Plan
import { RadioGroup } from '@rajatweb/argent'
<RadioGroup
label="Plan"
options={[
{ value: 'starter', label: 'Starter' },
{ value: 'growth', label: 'Growth' },
]}
onValueChange={setPlan}
/>Props
| Prop | Type | Default | What it does |
|---|---|---|---|
label required | string | ||
options required | readonly Option[] | ||
defaultValue | string | ||
disabled | boolean | ||
error | string | Error text. Also marks the field invalid. | |
hint | string | Help text under the field. | |
onValueChange | (value: string) => void | ||
required | boolean | ||
value | string |
Accessibility
- Arrow keys move between options on the web.
Do
- Use it for two to five options.
Don’t
- Use it for long lists. Use Select.