Components/Forms/Radio
fd-radio · 4 examples from SAP's documentation · Back to the gallery
About
Radio buttons provide users with a set of mutually exclusive options. They allow a user to select only one option from two or more choices. Each option is represented by a radio button. Consequently, radio buttons only work in groups. Use the radio button if:
Primary
Inline
Try to align radio buttons vertically instead of horizontally, especially for long labels. Horizontal alignment is harder to read and localize. Consider horizontal alignment in cases of one-word labels, such as in the background color settings example above. In forms, always align radio buttons vertically instead of horizontally as the length of the labels may vary for different languages. Do not put two radio button groups right next to each other as it is difficult to determine which buttons belong to which group. Use group labels and padding to separate them.
InteractionStates
A radio button can have different states that affect its appearance value states, such as “error” or “warning”, which are indicated using semantic colors
TextTruncation
By default, long radio label truncates with ellipsis. For this behaviour no modifier class is needed. For radio label that wraps on a new line to show the entire content, use \