Introduction
The Radio component is used for collecting a single option from a given list.
Configuration Options
Label
Expected Type: String
An optional label for the input. Can be used to define what the input is for, for the user.
Placeholder
Expected Type: String
An optional placeholder for the input. It's displayed inside the input till the input doesn't have a value.
Hint
Expected Type: String
An optional hint for the input. It's displayed inside a tooltip right next to the label upon hover.
Default Value
Expected Type: String
The default value for the input. This can be used to show initial values to the input that can then be changed by the user.
Disabled
Expected Type: Boolean
This determines whether the input component is editable by the user or not.
Options
The options determine which radio items are shown by this component. The options can either be pre-defined (static) or can dynamically come from a data point.
Static Options
When you know which options to use, you can predefine them under this section.
To add a radio option click on the + Option
button to add a new option.
Each option has
Label
Expected type:String
The text to show next to the radio componentValue
Expected type:String
A unique identifier for use in other components such as to dynamically change this components currently selected tab.Hidden
Expected type:Boolean
Whether this option should be hidden from the user. If enabled, the user will not see this option in the list.Disabled
Expected type:Boolean
Whether this option should be disabled. If enabled, the user will not be able to edit the value of this option.
Dynamic Options
Dynamic options can be used to render the options component dynamically based on some external data.
To add dynamic options, switch over to the dynamic
tab under the options configuration. You can then configure it:
Datasource
Expected type:Array | List
A list of items for the where each item represents a radio option. This can be fetched dynamically through workflows or other components.Label
Expected type:String
The key from the above datasource to use for the label. Each item in the datasource must have this key set.Value
Expected type:String
The key from the above datasource to use for the value. Each item in the datasource must have this key set.Hidden
Expected type:String
The key from the above datasource to use for the hidden property.Disabled
Expected type:String
The key from the above datasource to use for the disabled property.
Triggers
Change:
Triggers whenever the input is changed.
Validations
You can use the validation builder to add various validations on the input. This can range from the input simply being required to complex regex based validations.
You can read more on how to configure validations here.
Theme Options
Type:
The input theme style (Default | Compact | Alternate)Text Align:
The input's text alignment. (Number | Pixels)Text Color:
The input's text color. (String | Hex)Radio Active Color:
The radio's color when it's selected. (String | Hex)Radio Inactive Color:
The radio's color when it's not selected. (String | Hex)Label Color:
The input's text color. (String | Hex)Hint Color:
The input's text color. (String | Hex)Placeholder Color:
The input's placeholder color. (String | Hex)Text Size:
The input's text size. (Number | Pixels)Padding:
The input's padding. (Number | Pixels)Shadow:
The input's shadow. (Shadow)Border:
The input's border. You can also specify the radius for the edges. (Border)Background Color:
The input's background color. (String | Hex)