Skip to main content

Button group

Button group widget can be used to take actions.

Properties

Event: On click

To add an event to a button group, click on the widget handle to open the widget properties on the right sidebar. Go to the Events section and click on Add handler.

On Click event is triggered when the button group is clicked. Just like any other event on ToolJet, you can set multiple handlers for on click event.

info

Check Action Reference docs to get the detailed information about all the Actions.

Properties

PropertiesdescriptionExpected value
labellabel is used to set the heading of the button group.Any String value
labelsIt can be used to set the labels of the button group items.Array of strings
valuesValues for button group items.Array of strings
Default selectedInitial selected values can be set using this.Array of strings
Enable multiple selectionToggle this to allow multiple button selection.Toggle to true/false

Layout

LayoutdescriptionExpected value
Show on desktopToggle on or off to display desktop view.You can programmatically determing the value by clicking on Fx to set the value {{true}} or {{false}}
Show on mobileToggle on or off to display mobile view.You can programmatically determing the value by clicking on Fx to set the value {{true}} or {{false}}

Styles

StyleDescription
Background colorYou can change the background color of the widget by entering the Hex color code or choosing a color of your choice from the color picker.
Text colorYou can change the color of the Text in button by entering the Hex color code or choosing a color of your choice from the color picker.
VisibilityToggle on or off to control the visibility of the widget. You can programmatically change its value by clicking on the Fx button next to it. If {{false}} the widget will not visible after the app is deployed. By default, it's set to {{true}}.
DisableToggle on to lock the widget. You can programmatically change its value by clicking on the Fx button next to it, if set to {{true}}, the widget will be locked and becomes non-functional. By default, its value is set to {{false}}.
Border radiusUse this property to modify the border radius of the button.
Selected background colorUse this property to modify the background colour of selected buttons
info

Any property having Fx button next to its field can be programmatically configured.