Vanilla
CSS/SCSS
The last version of Internet Explorer, version 11, was released on October 17, 2013. This is a very long time ago when taking into account the rapid development of web technologies. These days it is often difficult and time consuming to get modern technologies to work well in this old browser. More and more frameworks are dropping support, and even Microsoft themselves has announced that they will fully drop support for IE in their own services in 2021.
Consequently, we have decided to not include support for IE in the Design Library website.
Luckily, there are modern options in active development. Please use Firefox, Edge or Chrome instead.
Use radio buttons when users must select one option in a list with exclusive options out of a set of two or more options. Radio buttons are common to use in forms, i.e when you apply for a loan and need to enter "Yes" or "No".
CSS/SCSS
CSS/SCSS
Typescript
Typescript
CSS/SCSS
A radio button allows a user to select a single item from a predefined list of options. Radio buttons are common to use in forms, i.e when you apply for a loan and need to enter "Yes" or "No".
Users should be able to understand their options as well as undo and redo their actions. For that reason radio buttons should always have one option pre-selected. List the options in a logical order such as; least complex to most complex, least risk to most risk, or most likely to be selected to least likely.
Radio buttons are almost always the preferred option to a dropdown. With radio buttons a user can immediately scan how many and what options there are, without having to click anything. Unless you have to present a lot of options (more than 7), or have a lack of space, use radio buttons.
There are perks with both vertical and horizontal placing. If there are two options, it’s recommended to place them horizontally. When there are more than two options, place the radio buttons vertically.
To make it easier for users to use the component, the label should also be clickable.
Read more about Pattern: Dark mode