Radio button
Use radio buttons where users must make a single selection.
certara-radio
Section titled “certara-radio”Properties
Section titled “Properties”checked
| Attribute | checked |
| Type | boolean |
| Default | false |
| Required | false |
| Description | The checked state of the radio |
disabled
| Attribute | disabled |
| Type | boolean |
| Default | false |
| Required | false |
| Description | The disabled state of the radio |
layout
| Attribute | layout |
| Type | "inline" | "inline-block" | "stacked" | "standalone" |
| Default | 'inline' |
| Required | false |
| Description | Stacked radios have one per line, inline radios are all on the same line |
name
| Attribute | name |
| Type | string |
| Default | undefined |
| Required | false |
| Description | The name of the radio |
size
| Attribute | size |
| Type | "md" | "sm" |
| Default | 'md' |
| Required | false |
| Description | The size of the checkbox |
value
| Attribute | value |
| Type | any |
| Default | 'on' |
| Required | false |
| Description | The value of the radio |
Events
Section titled “Events”| Name | Description | Bubbles |
|---|---|---|
certaraBlur | Standard event emitted when radio is blurred | true |
certaraChange | Standard event emitted when radio is toggled | false |
certaraFocus | Standard event emitted when radio is focused | true |
Methods
Section titled “Methods”There are no public methods available for this component
| Name | Description |
|---|---|
| Content for the label | |
help | Help text that sits below the label |
Design guidelines
Section titled “Design guidelines”Variants
Section titled “Variants” In practice
Section titled “In practice”Radio buttons should:
- Always be used with an associated label component.
- Be part of a list of radio buttons that:
- Include at least two or more choices.
- Are used to have users select only one option.
- Include mutually exclusive options — this means that each option must be independent from every other option in the list. For example: Red, blue, and yellow are mutually exclusive. Red, blue, yellow, red/blue are not mutually exclusive.
- List options in a rational order that makes logical sense.
- Have a default option selected whenever possible.
- A default option should only be avoided when the choices relate to a user’s privacy preferences, such as notifications settings, or sensitive personal information, such as gender.
Content guidelines
Section titled “Content guidelines”Labels
Section titled “Labels”- Keep radio labels short and descriptive.
- Start all radio buttons labels with a capital letter.
- Don’t include punctuation after radio button labels.
Accessibility
Section titled “Accessibility”Keyboard support
Section titled “Keyboard support”- Move focus to each radio using the tab key (or shift + tab when tabbing backwards)
- To interact with the radio when it has keyboard focus, press the space key