Skip to content

Selection Controls ​

Selection controls allow users to choose from a list of predefined options, ensuring consistency and preventing typing errors.

Selection Controls

A compact control that shows the current selection and expands to show a list of options when clicked.

Basic Usage ​

powershell
Add-UIDropdown -Step 'Config' -Name 'Environment' -Label 'Target Environment' `
               -Choices @('Development', 'Staging', 'Production') `
               -Default 'Development'

Parameters ​

ParameterTypeDescription
-ChoicesString[]Array of values to display in the list.
-EditableSwitchAllows users to type a custom value not in the list.
-ScriptBlockScriptBlockUsed for Dynamic Data Sources.

ListBox ​

A scrollable list where one or more options are visible at all times.

Basic Usage ​

powershell
Add-UIListBox -Step 'Features' -Name 'OptionalFeatures' -Label 'Select Features' `
              -Choices @('Web Server', 'Database', 'Cache', 'Monitoring') `
              -MultiSelect

Parameters ​

ParameterTypeDescription
-MultiSelectSwitchAllows selecting multiple items using Ctrl or Shift.
-ChoicesString[]Array of values to display in the list.

OptionGroup (Radio Buttons) ​

A set of mutually exclusive options where only one can be selected at a time. Ideal for small sets of 2-5 options.

Basic Usage ​

powershell
Add-UIOptionGroup -Step 'Config' -Name 'DeploymentType' -Label 'Deployment Type' `
                  -Options @('Standard', 'High Availability') `
                  -Orientation 'Horizontal'

Parameters ​

ParameterTypeDescription
-OptionsString[]Array of labels for the radio buttons.
-OrientationStringLayout of the buttons: 'Horizontal' or 'Vertical'.

Next: Boolean Controls