# Radio ## Examples ### Default ```html ``` ### RadioGroup ```html ``` ### States ```html ``` ### WithHint ```html ``` ### WithDescription ```html ``` ### WithError ```html This field is required ``` ### WithCustomContent ```html Custom formatted label Custom formatted hint Custom formatted error ``` ## Usage **Use a Radio Button to:** - Allow users to select one option from a list when multiple choices exist. - Present mutually exclusive options, where selecting one automatically deselects others. - Indicate a required selection, ensuring that users make a decision before proceeding. **Do not use a Radio Button to:** - Allow multiple selections (use checkboxes instead). - Toggle a single setting on or off (use a checkbox or toggle switch instead). - Display a long list of options (consider a dropdown for better space management). ## Other Considerations - Ensure each radio button descriptive labels that clearly communicate the choice (e.g., “Full-time”, “Part-time”). - Avoid using vague options like “Yes” and “No” unless the context is clear. - Default to the most common or recommended option when appropriate. - Visually group related options under a heading or a question to provide context. - Ensure that all radio buttons in a group are logically ordered for a smooth user experience. ## Design Rationale - Mutual exclusivity ensures users can only select one option, preventing conflicting choices. - Immediate feedback provides clarity, as selecting one option automatically deselects the others. - Ease of use makes radio buttons a familiar and effective choice for form inputs. - Consistency with accessibility guidelines ensures that all users, including those using assistive technologies, can easily interact with radio buttons.