Skip to main content
Feedback

Radio component CSS

warning

The content on this page is outdated and will not receive updates. For the most up-to-date functionality, refer to Setting up and managing flows.

This topic provides examples of the main CSS classes/selectors you can use to customize radio components.

Default player CSS

You can use the following main classes/selectors to apply additional CSS styling to radio components in a flow running the default player.

Class/SelectorDescription
.page-component-radioThe main class applied to the entire radio component in a flow.
For example, to increase the padding around all radio components in a flow:
.page-component-radio {padding:15px}
.radio-groupThe main class applied to the entire component, i.e., the entire group of radio buttons.
For example, to modify the padding around the entire component:
.radio-group {padding:15px}
.radioThe main class applied to each individual radio button within the component.
For example, to increase the font size for each radio button:
.radio {font-size:20px}

Default legacy player CSS

You can use the following classes/selectors to apply additional CSS styling to radio components in a flow running the default legacy player.

Class/SelectorDescription
.mw-bs .mw-radio-groupThe main class applied to the entire component, i.e., the entire group of radio buttons.
For example, to modify the padding around the entire component:
.mw-bs .mw-radio-group {padding:15px}
.mw-bs .mw-radioThe main class applied to each individual radio button within the component.
For example, to increase the font size for each radio button:
.mw-bs .mw-radio {font-size:20px}

Example: Radio buttons horizontal layout

Horizontal radio buttons

.customradio .radio-group {display:grid;align-items: end;}
.customradio .radio {grid-column:auto;grid-row:1;}

A 'classes' attribute is added to the radio component to apply the .customradio style, resulting in the radio buttons being laid out horizontally in columns.

On this Page