Temporary notification messages with semantic variants and dismissible functionality
Property | Type | Default | Description |
---|---|---|---|
message | String | required | The message text to display |
variant | HuxAlertVariant | info | Visual variant of the snackbar |
onDismiss | VoidCallback? | null | Callback when dismiss button is pressed |
autoDismiss | bool | false | Whether to automatically dismiss after duration |
dismissDuration | Duration | 5 seconds | How long to wait before auto-dismissing |
showDismissButton | bool | true | Whether to show the dismiss button |
dismissButtonText | String | 'Dismiss' | Text for the dismiss button |
HuxSnackbarVariant.info
- Blue styling for informational messagesHuxSnackbarVariant.success
- Green styling for success confirmationsHuxSnackbarVariant.error
- Red styling for error messagesHuxSnackbarVariant.warning
- Orange styling for warning messagesChoose the Right Variant
Message Length
Timing
Placement