Buma UI - DocumentationBuma UI - Documentation
Get Started
Foundations
Components
Resources
Patterns
Data Visualization
Back to BSpace
Get Started
Foundations
Components
Resources
Patterns
Data Visualization
  • stacksFoundations
    • 💡 Overview
    • Color
    • Principle
    • Typography
  • brickComponents
    • 💡 Overview
    • Accordion
    • Alert
    • Avatar
    • Badge
    • Bottom Sheet
    • Bread Crumb
    • Button
    • Button Link
    • Button Navigation
    • Calendar
    • Card
    • Chat
    • Checkbox
    • Chips
    • Choice Tile
    • Comment
    • Date Picker
    • Divider
    • Download
    • Drawer
    • Dropdown
    • Empty State
    • Floating Button
    • Form Input
    • Header
    • Hint
    • Icon
    • List Choice
    • Loading
    • Modal
    • Navigation Bar
    • Notification
    • Pagination
    • Progress Bar
    • Radio Button
    • Search
    • Scrolling Bar
    • Segmented Switch
    • Side Menu
    • Side Tab
    • Slider
    • Switch
    • Tab
    • Table
    • Text Area
    • Text Input
    • Time Picker
    • Title
    • Toast
    • Tooltip
    • Wizzard
  • splitscreenPattern
    • 💡 Overview
    • Filter
      upcoming
    • Form
      upcoming
    • Notification
    • PWA
      upcoming
    • table
      upcoming
    • Upload Download
      upcoming
  • insert_chartData Visualization
    • 💡 Overview
    • Tiering
    • Pattern
    • Chart and Graph
      • Chart Selection Guide
      • Map Selector
      • Donut Chart
      • Donut Progress Bar Chart
      • Spider Chart
      • Line Chart
      • Chart Area
      • Speedometer
      • Heat Map
      • Scatter Plot
      • Pie Chart
      • Bar Chart
      • Waterfall Chart
      • Sunburst Chart
      • Tree Decomposition Chart
      • Scorecards
      • Table
      • Micro Visualization
    • Typography
    • Color Palette
  • data_objectTokens
    upcoming
  • inventory_2Resources
    • 💡 Overview
    • Mobile
      new
      • 💡 Introduction
      • Installation
      • General
        • Important Rules
        • Naming Convention
        • Clean Architecture
    • Web
      upcoming
ComponentsAlertThe Alert component is designed to promptly inform users about significant changes or conditions within the interface.
Guidelines
Web
Resources You can use these components by accessing the provided resource files.

Usage

The package is already installed in the repository's shell. To use the component, you only need to add the following code:

<BAlert />

Attributes

If there is a question mark ? in the Data Type, it means that the properties are optional.

PropertiesData TypeDescriptionDefault Value
variantString?variant used for change alert colorsuccess
titleStringAlert TitleAlert Title
messageString?Alert variantLorem ipsum dolor sit amet, consectetur adipiscing
iconString?Add surfix iconnone
reverseBoolean?Alert variant style will be reversednone
buttonLinkBoolean?If true, a button link will be shownnone
buttonVariantString?variant used for change chips colornone
buttonLabelString?variant used for change chips colornone

Variants

The <BAlert /> component supports the following variants:

VariantDescription
successUsed to convey success states. For example, you might show a success message that tells the user that changes were saved or something was completed.
errorUsed to signal errors, the alert function comes into play once a user has initiated an action, subsequently encountering either internal or external issues.
warningUsed to prevent errors from occurring.
neutralUsed to convey general information that isn’t critical. For example, you might show an alert that asks for user feedback.
infoUsed to display information that needs user’s attention and may require further steps.
Mobile
Resources
  • You can use these components by accessing the provided resource files.
  • Preview animations are examples and may not suit Mobile Widgets. Press 'View Code' to access the Widgetbook Playground and see the Flutter widget displaying all created components and interactive.

Usage

Import this line to your file:

import 'package:buma_design_system/buma_design_system.dart';

Attributes

If there is a question mark ? in the Data Type, it means that the properties are optional

PropertiesData TypeDescriptionDefault Value
titleStringDisplay label of titlenone
descriptionString?Display optional describe of contentsnone
typeUIAlertType?Describe what UIAlertType you wantUIAlertType.success
reverseColorbool?Makes the colors inverted with reverseColorfalse
UIAlertType

Creating enumeration type of UIAlert

PropertiesDescription
success
Used to convey success states
error
Used to signal errors, the alert function comes into play once a user has initiated an action, subsequently encountering either internal or external issues
warning
Used to prevent errors from occurring
neutral
Used to convey general information that isn’t critical
info
Used to display information that needs user’s attention and may require further steps

Variants

You can call the components with Class.namedConstructor() with different variants.

Alert Success

Used to convey success states. For example, you might show a success message that tells the user that changes were saved or something was completed.

UIAlert.showAlert(
        context,
        'Text Alert',
        type: UIAlertType.success,
    );
Alert Error

Used to signal errors, the alert function comes into play once a user has initiated an action, subsequently encountering either internal or external issues.

UIAlert.showAlert(
        context,
        'Text Alert',
        type: UIAlertType.error,
    );
Alert Warning

Used to prevent errors from occurring.

UIAlert.showAlert(
        context,
        'Text Alert',
        type: UIAlertType.warning,
    );
Alert Neutral

Used to convey general information that isn’t critical. For example, you might show an alert that asks for user feedback.

UIAlert.showAlert(
        context,
        'Text Alert',
        type: UIAlertType.neutral,
    );
Alert Info

Used to display information that needs user’s attention and may require further steps.

UIAlert.showAlert(
        context,
        'Text Alert',
        type: UIAlertType.info,
    );
Alert Color Reverse
Alert offers a reverse color option, presenting an alternative bold visual style. This is particularly used for floating and non-fixed alerts.
UIAlert.showAlert(
        context,
        'Text Alert',
        type: { alert_type },
    );
Alert With Description
  • The Description Text variant offers an extended area for presenting descriptive text, allowing for the inclusion of additional context or details relevant to the alert message.
  • By providing supplementary information alongside the primary alert message, users can gain a deeper understanding of the situation or action required, improving overall clarity and comprehension.
  • Description text can include explanations, instructions, or further details about the alert, helping users make informed decisions or take appropriate actions in response to the message.
  • This variant can accommodate a wide range of use cases, from simple informational alerts to more complex notifications requiring detailed explanations or guidance. Maximum line is 3. If it exceeds it will become truncate.
UIAlert.showAlert(
        context,
        'Text Alert',
        type: UIAlertType.neutral,
        reverseColor: true,
        description: 'Lorem ipsum dolor sit amet, consectetur adipiscing', 
    );
arrow_back
Previous Accordion
Next Avatar
arrow_forward