Radio Styling

The Radio element is designed to allow a user to choose only one option from a set of given items. You can align these options horizontally or vertically using the settings properties.

We have two types of Radios: static and dynamic values. The static value option offers multiple items to select from a static list that you create manually. The dynamic value also offers multiple items to select from; however, the items in this list are pulled dynamically from Salesforce.

This element can be broken down into several parts, which can then be styled individually. For example, the label font size, color, or input fill color can all be styled.

You also have the option to style the element as a whole using the “Root” option. This element can be edited on both the Element Style Level and the Project Style Level.

Styling options
Styling options
#OptionFunctionAvailable in Project or Element
1RootThis option lets you set general properties that affect the Radio element as a whole.
2LabelThe Label option allows you to control the style of the descriptive text above the input. For example, its font size, color, and type.
3CaptionsThis refers to the text that appears next to the Radio icon.

You can change the default or selected text’s font color, padding, margin, and alignment.
4InputThis option allows you to adjust the Radio’s selection fill color (which is taken from the primary color by default). It also enables you, when using a custom icon (instead of the Radio), to adjust its size.
5MessagesThis option allows you to style the texts shown under the Radio element when the selection is valid or invalid. You can set the font for both messages and set a separate color for the success message and error message.

1. Root

The Root option enables you to set general properties that affect the Radio element as a whole such as primary color, element size, position, and alignment.

Root styling options
Root styling options
#OptionFunctionAvailable in Project or Element
1PrimaryThe Primary color given to the input fields affects its fill color when selected.
2SpacingIn a multiple-selection Radio (either static or dynamic), you can display the items horizontally or vertically by setting columns. 
The spacing property enables you to set the horizontal (column gap) or vertical (row gap) space between the Radio items.
3PositionYou can use this option to change the Radio element’s location on the x and y-axis of the strip (left/right/top/bottom).

The Position option also allows you to make the Radio element float over its parent container or over the entire page.

Float over Parent allows you to set the location of the input within the box containing it, for instance, the container or strip. Float over Page allows you to set the location of the Radio element inside the entire page and have it stay in the same location even when the user scrolls over it.
4SizeThis option allows you to change the width and height of the Radio container.
5AlignmentThis option allows you to set the Radio element to a vertical or horizontal position in relation to its container (left/center/right/top/middle/bottom).
It also allows you to set the position of a few elements in relation to each other.
6User CSSThe CSS (Cascading Style Sheets) allows the user to apply styles on the Radio via CSS code.

Note: For Project styling, CSS is accessed via the Tools menu, which you can read about in our article on CSS.
7Input VariantThis option allows you to set the size of the Radio element to be medium or small.

2. Label

The Label option allows you to control the style of the descriptive text above the input. For example, its font type, font size, and color.

Label styling options
Label styling options
#OptionFunctionAvailable in Project or Element
1FontThe Font option enables you to change the typography style, for instance, font family, weight, color, and size.
2MarginThis option allows you to set the outer space between the label and the adjacent element parts.
3AsteriskWhen a checkbox is mandatory, an asterisk is added to the element. You can style the asterisk using this option.

3. Default or Selected Caption

This option refers to the text that appears next to the Radio. It allows you to set the style for the caption’s default and selected states, enabling you to change the text’s font style, padding, margin, and alignment.

Captions styling options
Captions styling options
#OptionFunctionAvailable in Project or Element
1FontThe Font option enables you to change the Radio caption typography, for instance, font family, weight, color, and size.
2PaddingThe padding option allows you to add inner space inside of the caption container, making the text in it move (for example, adding 10 px top padding will push the caption text 10 px down).
3MarginThis option lets you set the outer space between the caption and the adjacent element parts.
4AlignmentThe alignment enables you to set the caption’s vertical position (top, center, bottom) in relation to the Radio next to it.

4. Input

The input allows you to style the Radio border and selected fill color (which will override the default taken from the primary color). It also enables you, when using a custom icon, to set its size (width and height).

Input styling options
Input styling options
#OptionFunctionAvailable in Project or Element
1IconThis option allows you to adjust the custom icon’s width and height.
2FillThis option allows you to override the default color of the Radio (taken from the primary color). Setting a color will apply to the border of the checkbox and its fill color when selected.

5. Messages

This option allows you to style the texts shown under the Radio element when the selection is valid or invalid.

Messages styling options
Messages styling options
#OptionFunctionAvailable in Project or Element
1FontThis option allows you to style the texts shown under the Radio element when the selection is valid or invalid. You can set the font for both messages and set a separate color for the success message and error message. 
2PaddingThe Padding option allows you to add inner space inside the message, making the text in it move (for example, adding 10 px top padding will push the caption text 10 px down).

Hidden Title

Need more help?