defaultValue- Type
string- Default
- -
- Description
- Initially selected value (uncontrolled).
Search for a command to run...
Components / Inputs
வானொலி குழு
Radio groups let users select exactly one option from a set. Use them when all options need to be visible simultaneously and only one can be chosen.
வானொலி குழுக்கள் பயனர்களை ஒரு தொகுப்பிலிருந்து சரியாக ஒரு விருப்பத்தை தேர்ந்தெடுக்க அனுமதிக்கின்றன.
3 parts documented for implementation and review.
<div>Root container with role=radiogroup managing selection. Wraps all RadioGroupItem+Label pairs. Uses flex with gap for spacing. Arrow keys cycle through items. Only one can be selected.
<button>Individual toggle with role=radio. 16x16px circle, shows filled dot when selected using brand color. Arrow keys navigate between group items. Space selects.
<label>Clickable text paired via htmlFor. Clicking selects the radio. Text-sm (14px). For Tamil, apply font-tamil. Labels should clearly differentiate each option.
defaultValuestringvaluestringonValueChange(value: string) => voiddisabledbooleanfalseorientation"horizontal" | "vertical""vertical"| Prop | Type | Default | Description |
|---|---|---|---|
defaultValue | string | - | Initially selected value (uncontrolled). |
value | string | - | Controlled selected value. |
onValueChange | (value: string) => void | - | Fired when selection changes. |
disabled | boolean | false | Disables all items in the group. |
orientation | "horizontal" | "vertical" | "vertical" | Direction of keyboard navigation. |
font-tamil on the Label component.Each radio item must have a visible text label linked via htmlFor so clicking the label also selects the option and screen readers can announce the choice.
ஒவ்வொரு வானொலி உருப்படியும் htmlFor மூலம் இணைக்கப்பட்ட தெரியும் உரை பெயர்ச்சீட்டு வேண்டும் — label-ஐ கிளிக் செய்வதும் விருப்பத்தை தேர்ந்தெடுக்கும்.
For a single binary toggle (yes/no, on/off), use a Switch or Checkbox instead — RadioGroup adds unnecessary markup for two-option decisions.
ஒரு இரட்டை நிலை தேர்வுக்கு (ஆம்/இல்லை), Switch அல்லது Checkbox பயன்படுத்தவும் — RadioGroup இரண்டு விருப்பங்களுக்கு தேவையற்ற குறியீட்டை சேர்க்கிறது.
Use defaultValue to pre-select the most common or safest option — it reduces cognitive load and speeds up form completion.
மிகவும் பொதுவான அல்லது பாதுகாப்பான விருப்பத்தை முன்கூட்டியே தேர்ந்தெடுக்க defaultValue பயன்படுத்தவும் — இது அறிவுசார் சுமையை குறைக்கிறது.
More than 7 radio options overwhelm users — switch to a Select (dropdown) which handles long lists more efficiently.
7-க்கும் அதிக வானொலி விருப்பங்கள் பயனர்களை அதிகமாக்குகின்றன — நீண்ட பட்டியல்களை திறம்பட கையாளும் Select (dropdown) பயன்படுத்தவும்.