Skip to content

Button Group

A customizable button group component that displays a row of connected button options.

The ButtonGroup widget provides a horizontal arrangement of buttons that share borders and appear as a single connected unit. It’s commonly used for mutually exclusive options, navigation sections, or view toggles.

  • Features: Connected buttons with shared borders
  • States: Normal, Interactive
  • Customizable: Supports icons, custom styling, and border radius

A simple button group with text-only options.


A button group with icons alongside text labels.


PropertyTypeDescription
optionsList<ButtonGroupOption>The list of options to display in the button group.
onOptionSelectedFunction(int)Callback function when an option is selected. Receives the index of the selected option.
textStyleTextStyle?Custom text style for the button labels. Defaults to semiBold14 with accent color.
radiusdoubleThe border radius of the button group’s outer corners. Defaults to 100.
backgroundColorColor?Background color of the buttons. If not provided, uses default background.
PropertyTypeDescription
labelStringThe text to be displayed for this option.
iconWidget?An optional icon widget to display before the label.