MUISecondary Button

A customizable secondary button by ModularUI with optional icons.

Properties

  • text: The Text to display inside the button.

  • onPressed: On Pressed Function.

  • boxShadows: Box shadows for the button.

  • bgColor: Background Color of The Secondary Button, default: Color(0xff212123).

  • tappedBgColor: Background Color of The Secondary Button when tapped, default: Color.fromARGB(255, 22, 22, 24).

  • textColor: Text Color of the Secondary Button, default: white.

  • borderRadius: Border Radius for Secondary Button, default: 10.

  • animationDuration: Animation Duration in Milliseconds, default: 250 ms.

  • hapticsEnabled: Enables Light Haptic Feedback.

  • leadingIcon: Optional leading icon for the button.

  • actionIcon: Optional action icon for the button.

  • iconColor: Icon color for both leading and action icons, default: white.

Example Usage

MUISecondaryButton(text: 'Secondary Button', onPressed: (){})

Notes

  • This component uses a GestureDetector to handle tap events and provides customizable visual feedback.

  • The button adjusts its appearance based on whether it is pressed or not, providing a visual indication of interaction.

  • Icons can be added to the leading and action positions with customizable colors and sizes.

  • Haptic feedback can be enabled for a subtle tactile response.

  • Box shadows can be customized to add depth and elevation to the button.

Last updated