Skip to main content
Version: 2027.02 Beta
View as Markdown

Perspective - Radio Group

Component Palette Icon:

Description​

The Radio Group allows you to create multiple radio buttons in a single container. The number of radio buttons in the group is determined by the number of elements in the "radios" object. Only one radio button in a group may be selected at a time. Radio groups are a good way to let the user choose just one of a number of options. If multiple selections are expected, the Checkbox or Dropdown components can be used.

The Radio Group component has three pre-configured variants:

  • Text Right - Default layout with text on the right of the radio button.
  • Text Left - Layout with text on the left of the radio button.
  • Multiple - Layout with multiple radio buttons and text on the right.

Properties​

Most Properties have binding options. For more information on Bindings, see Types of Bindings in Perspective. This section only documents the Props Category of properties. The other Categories are described on the Perspective Component Properties page.

NameDescriptionProperty Type
valueThe value of the selected radio.value: string, integer, boolean, or null
indexThe index of the selected node.value: integer
radiosList of radios that make up this group.
  • enabled: Whether the user is allowed to select this radio. Value is boolean.
  • text: Text to pair with this radio. Value is string.
  • selected: If 'true,' this radio is selected. Value is boolean.
  • value: The value of the radio to be evaluated when selected. Value is numeric.
  • style: Sets a style for this radio. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class.
array
orientationPlacement of the Radio Button: row or column. Default is row.value: string
alignAlign radios along the cross axis. Vertical if orientation is set to row; horizontal if orientation is set to column.value: string
justifyJustify radios along the main axis. Horizontal if orientation is set to row; vertical if orientation is set to column.value: string
textPositionWhere to place the label text in relation to the Radio Button: top, right, bottom, or left. Default is right.value: string
enabledIf true, user is allowed to select a radio. Default is true.

Note: If the component is disabled, scripts can still run on the component. For example, if you add a script action to the onClick event, the script will fire when the user clicks on the Radio Button.
value: boolean
selectedIconSettings for the appearance of the radio's icon when it is selected.
  • path: Path to the icon source, in format: library/IconName. For more information on icons, see the Images, and Icons in Perspective page. Value is string.
  • color: Settings for the fill color for the icon.
    • enabled: Color of the icon when enabled. Can be a named color. Value is string.
    • disabled: Color of the icon when disabled. Can be a named color. Value is string.
  • style: Sets a style for the icon. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class.
object
unselectedIconSettings for the appearance of the radio's icon when it is not selected.
  • path: Path to the icon source, in format: library/IconName. For more information on icons, see the Images, and Icons in Perspective page. Value is string.
  • color: Settings for the fill color for the icon.
    • enabled: Color of the icon when enabled. Can be a named color. Value is string.
    • disabled: Color of the icon when disabled. Can be a named color. Value is string.
  • style: Sets a style for the icon. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class.
object
radioStyleSets a style for the radio buttons. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous.object
styleSets a style for this component. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class.object

Component Scripts and Events​

Further component interaction and functionality can be configured for all components through scripting and event actions. Right-click on the component or select Components from the Designer menubar to access the configuration popups for both of these options:

  • Configure Events: Accesses the Event Configuration popup where you can configure actions to run in response to events to make the component dynamic. The Events Configurations page shows how to configure events and actions on a Perspective component.

  • Configure Scripts: Accesses the Script Configuration popup where custom methods and message handlers can be added. The Scripting in Perspective section details scripting fundamentals, creating custom methods, and using message handlers.