Button Group (New)

A component that displays a group of buttons.

Properties

Available properties for Button Group (New) with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read information about components.

NameTypeDescriptionalignment'stretch' | 'left' | 'center' | 'right'

The horizontal alignment of the contents.

heightType'fixed' | 'auto'

Whether the height automatically resizes to fit content or is a fixed size.

hiddenboolean

Whether the component is visible.

maintainSpaceWhenHiddenboolean

Whether the component takes up space on the canvas if hidden is true.

marginstring

The amount of margin to render outside of the component.

overflowMode'scroll' | 'wrap'

Whether to use a scrolling experience or wrap the visible buttons when heightType is 'auto'. Despite the similar name, this does not affect the behavior of the overflow menu.

overflowPositionnumber

All buttons after this index are placed in the overflow menu

overlayMaxHeightnumber | null

The maximum height of the dropdown, in px.

overlayMinWidthnumber | null

The minimum width of the dropdown, in px.

showInEditorboolean

Whether the component remains visible in the editor if hidden is true.

tooltipTextstring

The text to display in a tooltip on hover or focus.

Events

Events are triggered by user interactions with Button Group (New). Use event handling to trigger queries or other actions in response to events.

NameDescriptionClick

A user clicks on one of the buttons.

Methods

Methods for interacting with Button Group (New). You can write JavaScript almost anywhere in Retool and use methods to manipulate data or components.

NameDescriptionscrollIntoView(options: any)

Scrolls the canvas or parent container so that the selected component appears in the visible area.

setHidden(hidden: boolean)

Set the hidden value to toggle whether the component is visible. Defaults to true without a parameter.