Button Group

Creates a group of single-select buttons for quick filtering

To see how to filter a query using a Button Group, see Filters.

Examples

Button Group using Options from a Query

Selected:

With a Title

Select a Category

Selected:

With a Default Value

Selected: Cursed Sporting Goods

With Hardcoded Options

Selected:

With Hardcoded Options and Default Value

Selected: 2

Alternative Labels

Selected:

Filtering a Query

Loading...

Style Buttons as Tabs

Selected:

Style Buttons as Tabs: With Hardcoded Options

Selected:

ButtonGroup

Options

Required
Name of the button group, used to reference the selected value elsewhere as {inputs.name}
Preset values to use
Options:
dates
Query name, wrapped in curly braces
Options:
query name
Column name from the query containing values to pick from
Options:
column name
Column name from the query containing labels to display instead of the values (e.g., you may want to have the drop-down use `customer_id` as the value, but show `customer_name` to your users)
Options:
column name
Default:
Uses the column in value
Title to display above the button group
Options:
string
Sets initial active button and current value
Options:
value from button group, e.g. 'Cursed Sporting Goods'
Column to sort options by
Options:
column name
Default:
Uses the same order as the query in `data`
SQL where fragment to filter options by (e.g., where sales > 40000)
Options:
SQL where clause
Displays tabs with button functionality
Options:
Default:
buttons

ButtonGroupItem

The ButtonGroupItem component can be used to manually add options to a button group. This is useful if you want to add a default option, or if you want to add options that are not in a query.

Options

Required
Value to use when the option is selected
Label to display for the option in the dropdown
Options:
string
Default:
Uses value
Sets the option as the default
Options:
Default:
false
Hide the component when the report is printed
Options:
Default:
true