Skip to content

Option Button

An action button component that represents compact information elements, choices, filters or actions.

The OptionButton widget provides a flexible way to display small interactive elements with various visual styles. Option buttons can include text labels, icons, avatars and support different states and interactions.

  • Types: Filled, Outline, Avatar variations
  • Content Types: Text with optional icons or avatar
  • States: Normal, Active, Disabled, Error
  • Customizable: Supports different styles, icons and full width mode

Basic option button with solid background.


Option Button with transparent background and border.


Option Button with an icon before the label.


Option Button with an icon after the label.


Option Button with a circular avatar image.


Non-interactive option button with disabled styling.


Option Button indicating an error condition.


Option Button that expands to fill container width.


PropertyTypeDescription
labelStringRequired. The text to be displayed in the option button.
prefixIconWidget?Widget to display before the label, typically an icon.
suffixIconWidget?Widget to display after the label, typically an action icon.
avatarString?URL of an avatar image to display at the start of the option button.
typeOption ButtonTypeVisual style variant of the option button (filled, outline, etc). Default: filled.
stateOption ButtonStateInteraction state affecting appearance (enabled, disabled, error, etc). Default: enabled.
isActiveboolWhether the option button is in selected/active state. Changes colors when true. Default: false.
fullWidthboolMakes the option button expand to fill container width. Default: false.
onPressedVoidCallback?Callback function when the option button is tapped. If null, option button appears disabled.