Documentation Index
Fetch the complete documentation index at: https://synapsync.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
NbxButton is a flexible button component that provides consistent styling and behavior across the Nebux Design System. It supports multiple visual variants, loading states, icons, and comprehensive configuration options.
Basic Usage
Widget Properties
The text to display on the button.
Callback function called when the button is pressed. Will be null when button is disabled or loading.
Configuration for button icons (leading and trailing).
Configuration for button styling (variant, colors, text style).
Configuration for button state (loading, enabled, selected).
Configuration for button layout (expanded width).
Button Variants
The button supports four visual variants throughButtonVariant enum:
ButtonVariant.filled- Filled button with solid background (default)ButtonVariant.text- Text button with underline decorationButtonVariant.outline- Outlined button with borderButtonVariant.danger- Danger button with error color
Configuration Classes
ButtonIconConfig
Controls icon display and styling.Icon to display before the text.
The color of the leading icon.
Icon to display after the text.
The color of the trailing icon.
ButtonStyleConfig
Controls visual styling and appearance.The visual variant of the button.
Custom background color for the button.
Custom border radius for the button.
Custom text style for the button.
Custom border configuration for outline variant.
ButtonStateConfig
Manages button state and behavior.Whether to show a loading indicator instead of text.
Whether the button is enabled.
Whether the button is selected (affects outline variant appearance).
Custom color for the loading spinner. When null, the spinner color is derived from the button variant.
ButtonLayoutConfig
Controls button layout properties.Whether the button should expand to fill available width.