ToolJet/docs/versioned_docs/version-2.33.0/widgets/button-group.md

80 lines
4.8 KiB
Markdown
Raw Normal View History

Release: Community changes (v2.34.0) (#9226) * add custom resolvers info and editable row selection info (#9057) * fix system requirements icon * add auth info for webhooks and fix casing * add regex custom validation info (#9068) * [docs]: Marketplace 1.7 updates (#9085) * [docs] Amazon redshift plugin * make minor improvements * add and update docs for marketplace 1.7 * update order of plugins in overview to match sidebar * create new version --------- Co-authored-by: Shubhendra <withshubh@gmail.com> * add the latest version in the versions.json file (#9094) * [docs]: Update PDF component (#9088) * update PDF component * merged with develop and added changes to the new version * update docs favicon: (#9118) * [docs] SSO revamp (#9031) * add method to set default language * update image settings through custom css and update screenshots for getting started and tooljet concepts (#9158) * fix read documentation button * fix formatting for setup icons (#9172) * fix sidebar link for aws lambda * Update static media (#9175) * updated the screenshots * reduced the gif size * reverted the package.json file * edited the zoomed in images and replaced some gifs with screenshots * removed one gif * update static media * update file names * update toolbar * fix file names * fix: dynamodb img path * update media for org management dashboard * fix: casing and formatting * update workspace constant media * update media in workspace settings and github * update github sso * minor change to github sso docs * minor fix * update google sso * change includeCurrentVersion flag to false --------- Co-authored-by: Asjad Ahmed Khan <iitasjad2001@gmail.com> Co-authored-by: Asjad Ahmed Khan <60435499+2001asjad@users.noreply.github.com> Co-authored-by: Karan Rathod <karan.altcampus@gmail.com> * Feature: Engagespot plugin (#9012) * feat(plugins): added engagespot plugin * feat(docs): added engagespot plugin docs * chore(engagespot-plugin): revised copywritings * Feature: Databricks data source (#9174) * plugin-created * Databricks integration * icon, error handling * removed unrelated changes from marketplace and frontend package-lock.json removed runAsync and maxRows timeouts pending * timeout implementation * socket timeout and error handling * resolve comments * resolve comments2 * solved render issue test connection improvements * solved undefined error * fix TJDB not null value fail for is operation (#9055) * fix TJDB not null value fail for is operation * handling not null and null case insenstive values * Support for marketplace plugin deploy on render preview app (#9221) * Fix for marketplace error on render preview app * add marketplace build command * Adding new workflow for building marketplace plugin * removed render app creation * [:docs] Add documentation for Databricks plugin (#9224) * add docs for databricks * update databricks docs * update docs * remove ref to clusters * bump to v2.34.0 * Fixed data source cypress failure (#9227) * updated spec with required text * updated mongodb and import spec * updated import spec --------- Co-authored-by: Karan Rathod <karan.altcampus@gmail.com> Co-authored-by: Adish M <44204658+adishM98@users.noreply.github.com> Co-authored-by: Midhun G S <gsmithun4@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Aman Regu <amanregu@gmail.com> Co-authored-by: Asjad Ahmed Khan <iitasjad2001@gmail.com> Co-authored-by: Asjad Ahmed Khan <60435499+2001asjad@users.noreply.github.com> Co-authored-by: Jobin Jose <129726530+jobin-logidots@users.noreply.github.com> Co-authored-by: Syed Mohammad Akhtar Rizvi <85864291+ShazanRizvi@users.noreply.github.com> Co-authored-by: blank0537 <111295371+blank0537@users.noreply.github.com> Co-authored-by: Mekhla Asopa <59684099+Mekhla-Asopa@users.noreply.github.com>
2024-03-29 13:43:26 +00:00
---
id: button-group
title: Button Group
---
# Button group
The Button group component is used to group a series of buttons together in a single line. It is used to group related buttons.
<div style={{textAlign: 'left'}}>
<img className="screenshot-full" src="/img/widgets/button-group/buttongroup1.png" alt="Button group" />
</div>
## Properties
| Properties | Description | Expected Value |
|:----------- |:----------- |:-------------- |
| **label** | Used to set the title of the button-group. | Any **String** value: `Select the options` or `{{queries.queryname.data.text}}` |
| **values** | It can be used to set the values of the button group items. | **Array** of strings and numbers: `{{[1,2,3]}}` |
| **labels** | It can be used to set the labels of the button group items. | **Array** of strings and numbers: `{{['A','B','C']}}` |
| **Default selected** | Initial selected values can be set using this. | **Array** of strings and numbers: `{{[1]}}` will select the first button by default. |
| **Enable multiple selection** | Toggle on or off to enable multiple selection. | **Boolean** value: `{{true}}` or `{{false}}` |
## Events
Events are actions that can be triggered programmatically when the user interacts with the component. Click on the component handle to open its properties on the right. Go to the **Events** accordion and click on **+ Add handler**.
| Events | Description |
|:----------- |:----------- |
| **On click** | This event is triggered when the user clicks on the button in the button group. |
:::info
Check [Action Reference](/docs/category/actions-reference) docs to get the detailed information about all the **Actions**.
:::
## General
#### Tooltip
A Tooltip is often used to display additional information when the user hovers the mouse pointer over the component. Once a value is set for Tooltip, hovering over the element will display the specified string as the tooltip text.
<div style={{textAlign: 'center'}}>
<img className="screenshot-full" src="/img/widgets/button-group/grouptooltip.png" alt="Button group layout" />
</div>
## Layout
#### Show on desktop
Use this toggle to show or hide the component in the desktop view. You can dynamically configure the value by clicking on **Fx** and entering a logical expression that results in either true or false. Alternatively, you can directly set the values to **`{{true}}`** or **`{{false}}`**.
#### Show on mobile
Use this toggle to show or hide the component in the mobile view. You can dynamically configure the value by clicking on **Fx** and entering a logical expression that results in either true or false. Alternatively, you can directly set the values to **`{{true}}`** or **`{{false}}`**.
## Styles
| Style | Description | Expected value |
| :---------- | :---------- | :-------------- |
| **Background color** | Set a background color for the buttons in buttons group. | Choose a color from the picker or enter the Hex color code. ex: `#000000` |
| **Text color** | Set a text color for the buttons in buttons group. | Choose a color from the picker or enter the Hex color code. ex: `#000000` |
| **Visibility** | Make the component visible or hidden. | **`{{true}}`** or **`{{false}}`**, By default, its value is set to `{{true}}` |
| **Disable** | Disable the component. | **`{{true}}`** or **`{{false}}`**, By default, its value is set to `{{false}}` |
| **Border radius** | Add a border radius to the buttons in the component using this property. | Any numerical value from `0` to `100` |
| **Selected text color** | Use this property to modify the text color of selected button | Choose a color from the picker or enter the Hex color code. ex: `#000000` |
| **Selected background color** | Use this property to modify the background color of selected button | Choose a color from the picker or enter the Hex color code. ex: `#000000` |
| **Box Shadow** | Sets the add shadow effects around a component's frame. You can specify the horizontal and vertical offsets(through X and Y sliders), blur and spread radius, and color of the shadow. | Values that represent X, Y, blur, spread, and color. Example: `9px 11px 5px 5px #00000040`` |
## Exposed Variables
| Variable | Description |
| :---------- | :---------- |
| **selected** | If the **enable multiple selection** option is turned off, then the variable is an array of objects, and the first object holds the value of the selected button. However, if the **enable multiple selection** option is turned on, the variable type changes from an array to an object, and the selected button values are stored as a string within that object. The value can be accessed using `{{components.buttongroup1.selected[0]}}` or `{{components.buttongroup1.selected}}` |
## Component specific actions (CSA)
There are currently no CSA (Component-Specific Actions) implemented to regulate or control the button-group component.