Skip to main content
This widget is specifically designed for use within the NeoSidebarLayout and should not be used outside of that context.

Examples

Properties

Required

String
required
The text label displayed on the button. Also used as tooltip text when sidebar is collapsed.
VoidCallback
required
The callback function triggered when the button is pressed.

Content

Object Function(PhosphorIconsStyle)?
Icon callback from phosphoricons_flutter. Return PhosphorIconsDuotone.* for .duotone (active) and PhosphorIconsRegular.* for .regular.
String
When provided, a badge will be displayed on the button. Transforms into an indicator dot when sidebar is collapsed.
Color
The color of the badge.
bool
default:"false"
Whether to show a caret icon at the end of the button. Useful for indicating expandable sections. Hidden when sidebar is collapsed.
This feature is in alpha and may change. Behavior can be unpredictable.

State

bool
default:"false"
Whether the button is in an active/selected state. Active buttons have enhanced styling with duotone icons and branded colors.

Best Practices

  • Call NeoHaptics in onPressed when you want press feedback. This button does not play haptics on its own.
  • Use badgeText for a count or a short status such as “NEW”.

Behavior

  • It follows the sidebar’s collapsed state.
  • A tooltip shows on while the sidebar is collapsed.
  • The badge becomes an indicator when the sidebar collapses.
Last modified on September 30, 2026