Control

The Control Widget category consists of the following widgets:


Button widget

The following tables offer usage details about the properties available to Button widgets. Several examples follow the tables.

Properties

AttributeDescriptionTypeRequiredChanged By
cssClassesThe CSS classes for the button.string[]NoDirect Edit
disabledSpecifies whether the user can interact with the widget. Defaults to false. Values are typically templated expressions that produce booleans (e.g. “{{w1.on}}”).booleanYesDirect Edit
textThe display text for the button.stringYesDirect Edit

Examples

Button

Copied!
1 {"cssClasses": ["pt-button","pt-intent-primary"],"disabled": false,"text": "Run"}

Defaults

Copied!
1 {"cssClasses": ["pt-button","pt-intent-primary"],"disabled": false,"queryNames": [],"text": "Run"}

Checkbox widget

The following tables offer usage details about the properties available to Checkbox widgets.

Properties

AttributeDescriptionTypeRequiredChanged By
disabledSpecifies whether the user can interact with the widget. Defaults to false. Values are typically templated expressions that produce booleans (e.g. “{{w1.on}}”).booleanYesDirect Edit
displayValuesAn optional list that defines the display values of the items in the checkbox group. There should be a display value for each item in ‘values’. If ‘displayValues’ is not specified, the raw value for each item will be displayed instead.string[]NoDirect Edit
hoverWhen tooltipsEnabled = true, this property determines the value you are hovering over.ICheckboxHoverNoUser Interaction
selectedDisplayValuesThe list of display values of the items that are currently checked.string[]YesUser Interaction
selectedValuesThe list of items that are currently checked.any[]YesUser Interaction
tooltipsEnabledSpecifies whether tooltips are enabled.booleanYesDirect Edit
tooltipTextThe text displayed in tooltips. If this value is null or the empty string then no tooltip will be displayed. Supports HTML.stringNoDirect Edit
valuesThe values for the items in the checkbox group.any[]YesDirect Edit

ICheckboxHover

AttributeDescriptionTypeRequiredChanged By
displayValueThe display value of the checkbox currently being hovered over.stringYesUser Interaction
indexThe index of the checkbox label currently being hovered over.numberYesUser Interaction
valueThe raw value of the checkbox currently being hovered over.anyYesUser Interaction

Dropdown widget

The following tables offer usage details about the properties available to Dropdown widgets. Several examples follow the tables.

Properties

AttributeDescriptionTypeRequiredChanged By
disabledSpecifies whether the user can interact with the widget. Defaults to false. Values are typically templated expressions that produce booleans (e.g. “{{w1.on}}”).booleanYesDirect Edit
fuzzySearchEnabledToggle fuzzy matching for search.booleanYesDirect Edit
displayValuesThe values displayed in the dropdown. If not specified, ‘values’ will be used.any[]NoDirect Edit
groupsThe group in which corresponding ‘values’ entries will be displayed.any[]NoDirect Edit
maintainValidSelectionIndicates whether the currently selected value should remain the selected value when the widget is invalidated, so long as the value is still valid.booleanYesDirect Edit
searchTextSearch text to filter the ‘values’ array. See serverSearchEnabled for details.stringYesUser Interaction
selectedDisplayValueThe displayed value of the dropdown.stringYesUser Interaction
selectedValueThe current user selected dropdown value.anyYesUser Interaction
serverSearchEnabledIndicates that user input search text should trigger a new query. Otherwise, the ‘values’ array is searched locally for matches.booleanYesDirect Edit
valuesThe values from which ‘selectedValue’ is set. Should be a one-to-one mapping to displayValues if displayValues is used.any[]YesDirect Edit

Examples

Dynamic Dropdown

Copied!
1 2 3 4 5 6 7 8 { "disabled": false, "displayValues": "{{query1.memberName}}", "searchText": "John", "selectedValue": "65849", "serverSearchEnabled": true, "values": "{{query1.memberId}}" }

Static Dropdown

Copied!
1 2 3 4 5 6 7 8 9 10 11 { "disabled": false, "searchText": "", "selectedValue": "giraffe", "serverSearchEnabled": false, "values": [ "giraffe", "rhinoceros", "elephant" ] }

Defaults

Copied!
1 2 3 4 5 6 7 { "disabled": false, "searchText": "", "selectedValue": null, "serverSearchEnabled": false, "values": [] }

Input Box widget

The following tables offer usage details about the properties available to Input Box widgets. Several examples follow the tables.

Properties

AttributeDescriptionTypeRequiredChanged By
disabledSpecifies whether the user can interact with the widget. Defaults to false. Values are typically templated expressions that produce booleans (e.g. “{{w1.on}}”).booleanYesDirect Edit
placeholderThe text to use for the input box placeholder (no IE9 support).stringNoDirect Edit
queryNamesThe names of the queries this input box should execute when the Enter key is used.string[]NoDirect Edit
textThe text the user has typed in the box.stringYesUser Interaction

Examples

Input Box

Copied!
1 2 3 4 5 6 { "disabled": false, "placeholder": "Choose an animal...", "queryName": "query1", "text": "" }

Defaults

Copied!
1 2 3 4 5 { "disabled": false, "placeholder": "placeholder goes here", "text": "" }

Multiselect Box widget

The following tables offer usage details about the properties available to Multiselect Box widgets. Several examples follow the tables.

Properties

AttributeDescriptionTypeRequiredChanged By
disabledSpecifies whether the user can interact with the widget. Defaults to false. Values are typically templated expressions that produce booleans (e.g. “{{w1.on}}”).booleanYesDirect Edit
displayValuesThe values displayed in the multiselect box. If not specified, ‘values’ will be used.string[]NoDirect Edit
fuzzySearchEnabledToggle fuzzy matching for search.booleanYesDirect Edit
placeholderThe text to use for the multiselect box placeholderstringNoDirect Edit
hasValuesIndicates if the user has input a value.booleanYesUser Interaction
selectedDisplayValuesThe current user input displayed selected values.string[]YesUser Interaction
selectedValuesThe current user input selected values.any[]YesUser Interaction
searchTextSearch text to filter the ‘values’ array. See serverSearchEnabled for details.stringYesUser Interaction
serverSearchEnabledIndicates that user input search text should trigger a new query. Otherwise, the ‘values’ array is searched locally for matches.booleanYesDirect Edit
tokenSeparatorString that separates tokens in the input. If not specified, input will not be tokenized. New line characters are read as spaces in the input.stringNoDirect Edit
valuesThe values from which ‘selectedValues’ is set. Should be a one-to-one mapping to ‘displayValues’ if ‘displayValues’ is used.any[]YesDirect Edit

Examples

Dynamic Multiselect

Copied!
1 2 3 4 5 6 7 8 9 10 { "disabled": false, "displayValues": "{{query1.memberName}}", "hasValues": false, "searchText": "John", "selectedDisplayValues": [], "selectedValues": [], "serverSearchEnabled": true, "values": "{{query1.memberId}}" }

Static Multiselect

Copied!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 { "disabled": false, "hasValues": true, "selectedDisplayValues": [ "giraffe", "rhinoceros" ], "selectedValues": [ "giraffe", "rhinoceros" ], "serverSearchEnabled": false, "values": [ "giraffe", "rhinoceros", "elephant" ] }

Defaults

Copied!
1 2 3 4 5 6 7 8 { "disabled": false, "hasValues": false, "selectedDisplayValues": [], "selectedValues": [], "serverSearchEnabled": false, "values": [] }

Radio button widget

The following tables offer usage details about the properties available to radio button widgets.

Properties

AttributeDescriptionTypeRequiredChanged By
disabledSpecifies whether the user can interact with the widget. Defaults to false. Values are typically templated expressions that produce booleans (e.g. “{{w1.on}}”).booleanYesDirect Edit
displayValuesAn optional list that defines the display values of the items in the radio button group. There should be a display value for each item in ‘values’. If ‘displayValues’ is not specified, the raw value for each item will be displayed instead.string[]NoDirect Edit
preselectFirstElementSpecifies whether the first value is selected by default or not.booleanYesDirect Edit
hoverWhen tooltipsEnabled = true, this property determines the value you are hovering over.IRadioHoverNoUser Interaction
selectedDisplayValueThe display value that is currently selected.stringYesUser Interaction
selectedValueThe value that is currently selected.anyYesUser Interaction
tooltipsEnabledSpecifies whether tooltips are enabled.booleanYesDirect Edit
tooltipTextThe text displayed in tooltips. If this value is null or the empty string then no tooltip will be displayed. Supports HTML.stringNoDirect Edit
valuesThe values for the items in the radio button group.any[]YesDirect Edit

ICheckboxHover

AttributeDescriptionTypeRequiredChanged By
displayValueThe display value of the radio currently being hovered over.stringYesUser Interaction
indexThe index of the radio label currently being hovered over.numberYesUser Interaction
valueThe raw value of the radio currently being hovered over.anyYesUser Interaction

Segmented Control widget

The following tables offer usage details about the properties available to Segmented Control widgets.

Properties

AttributeDescriptionTypeRequiredChanged By
disabledSpecifies whether the user can interact with the widget. Defaults to false. Values are typically templated expressions that produce booleans (e.g. “{{w1.on}}”).booleanYesDirect Edit
displayValuesThe values displayed in the segmented control. If not specified, ‘values’ will be used.any[]NoDirect Edit
hoverWhen tooltipsEnabled = true, this property determines the value you are hovering over.ISegmentedControlHoverNoUser Interaction
multiselectEnabledSpecifies whether the user can select only one value or multiple values.booleanYesDirect Edit
preselectFirstElementSpecifies whether the first value is selected by default or not.booleanYesDirect Edit
selectionRequiredSpecifies whether you can deselect all values. When enabled, this flag prevents the user from deselecting the final selected value in the widget. If the widget starts off with no values selected, prevents deselecting only after the user makes an initial selection.booleanYesDirect Edit
selectedValuesThe current user selected value or values.any[]YesUser Interaction
tooltipsEnabledSpecifies whether tooltips should be shown or notbooleanYesUser Interaction
tooltipTextThe text displayed in tooltips. Supports HTML.stringNoDirect Edit
valuesThe values from which ‘selectedValues’ is set. Should be a one-to-one mapping to displayValues if displayValues is used.any[]YesDirect Edit

ISegmentedControlHover

AttributeDescriptionTypeRequiredChanged By
displayValueThe display value of the segment currently being hovered over.stringYesUser Interaction
indexThe index of the segment currently being hovered over. segments are numbered from left to rightnumberYesUser Interaction
valueThe raw value of the segment currently being hovered over.anyYesUser Interaction

Slider widget

The following tables offer usage details about the properties available to Slider widgets. Several examples follow the tables.

Properties

AttributeDescriptionTypeRequiredChanged By
disabledSpecifies whether the user can interact with the widget. Defaults to false. Values are typically templated expressions that produce booleans (e.g. “{{w1.on}}”).booleanYesDirect Edit
formatModeSpecifies how to format the slider labels. “Grouped” groups digits together with a specified delimiter. For example: 1000000 will become 1,000,000 if the delimiter is a comma. “Numeric” will format the values using a provided Numeral.js ↗ format. “Time” will format the values using a provided moment.js ↗ format.stringYesDirect Edit
formatterWhen “Numeric” or “Time” is selected, this property holds the format string.stringNoDirect Edit
fromWhen range mode is enabled, this property holds the value of the lower bound of the range. Otherwise, it holds the value associated with the current position of the single slider handle.numberYesUser Interaction
groupingDelimiterWhen the “Grouped” format is selected, this property holds the delimiter string used to separate groups.stringNoDirect Edit
maxThe maximum selectable value.numberYesDirect Edit
minThe minimum selectable value.numberYesDirect Edit
numLabelsThe number of axis labels to display. If no value is provided, defaults to 6.numberYesDirect Edit
postfixThe text to append to all values. For example: ” €” will convert “100” in to “100 €”stringNoDirect Edit
prefixThe text to prepend to all values. For example: “$” will convert “100” in to “$100”stringNoDirect Edit
rangeEnabledSpecifies whether selection is enabled for a range of values or just a single point.booleanYesDirect Edit
stepThe step size for selectable values.numberNoDirect Edit
toWhen range mode is enabled, this property holds the value of the upper bound of the range.numberNoUser Interaction
updateOnSlideSpecifies when the value of the slider is updated. “Release” indicates that the value will be updated after the handle is released. “Slide” indicates that the value will be updated as the slider is dragged. You should avoid using “Slide” except for light operations (such as UI updates) due to performance impact. “Slide” updates are throttled to 100ms.booleanYesDirect Edit

Examples

Slider

Copied!
1 2 3 4 5 6 7 8 9 10 11 { "disabled": false, "from": 25, "groupingDelimiter": " ", "groupingEnabled": true, "max": "{{query1.maxValue}}", "min": 1, "prefix": "$", "rangeEnabled": true, "to": 50 }

Defaults

Copied!
1 2 3 4 5 6 7 8 { "disabled": false, "from": 25, "groupingEnabled": false, "max": 100, "min": 0, "rangeEnabled": false }

Textarea widget

The following tables offer usage details about the properties available to Textarea widgets. Several examples follow the tables.

Properties

AttributeDescriptionTypeRequiredChanged By
delimiterA sequence of one or more characters which indicates separation of two values. For instance, if ‘text’ is “hello- -world” and ‘delimiter’ is “- -“, ‘values’ will result to ["hello", "world"]stringNoDirect Edit
disabledSpecifies whether the user can interact with the widget. Defaults to false. Values are typically templated expressions that produce booleans (e.g. “{{w1.on}}”).booleanYesDirect Edit
hasValuesIndicates if the user has input a value.booleanYesUser Interaction
maxLengthEnabledIf enabled, limits the length of text entered by the user.booleanYesDirect Edit
maxLengthThe maximum length of text allowed to be typed into the box.numberNoDirect Edit
placeholderThe text to use for the textarea placeholder (no IE9 support)stringNoDirect Edit
textThe text the user types into the box.stringYesUser Interaction
valuesThe user input values derived from the inputText.arrayYesUser Interaction

Examples

Textarea

Copied!
1 2 3 4 5 6 7 8 9 10 11 12 { "delimiter": ";", "disabled": false, "hasValues": true, "placeholder": "Choose an animal...", "text": "giraffe; rhinoceros; elephant", "values": [ "giraffe", "rhinoceros", "elephant" ] }

Defaults

Copied!
1 2 3 4 5 6 7 { "delimiter": ";", "disabled": false, "hasValues": false, "text": "", "values": [] }

Toggle widget

The following tables offer usage details about the properties available to Toggle widgets. Several examples follow the tables.

Properties

AttributeDescriptionTypeRequiredChanged By
disabledSpecifies whether the user can interact with the widget. Defaults to false. Values are typically templated expressions that produce booleans (e.g. “{{w1.on}}”).booleanYesDirect Edit
offLabelThe label for the ‘off’ state of the toggle switchstringYesDirect Edit
onLabelThe label for the ‘on’ state of the toggle switchstringYesDirect Edit
useCustomIconsWhen selected, the toggle will use custom icons from BlueprintcheckboxYesDirect Edit
onIconThe icon for the ‘on’ state of the toggle switchstringNoDirect Edit
offIconThe icon for the ‘off’ state of the toggle switchstringNoDirect Edit
onThe current state of the toggle switch, with the ‘on’ state corresponding to ‘true’booleanYesUser Interaction