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
ComponentsToastThe Toast component is a non-intrusive notification element that briefly appears to provide users with important messages, alerts, or feedback.
Guidelines

Anatomy

 Contains the elements of the toast.
 Label to indicate the title of toast.
 Use colored logo in default variant, and white logo in success & error variant.  You can use it or not, depends on the usage.
 To close the toast.
 (Optional) Displays icons that provide additional visual context to the user.
 Contains a description of the information.
Toast Variant
Primary
Secondary-light
Secondary-white
VARIANTUSAGE RECOMMENDATION
DefaultUtilize the Default Toast variation for general notifications, informative messages, or neutral feedback. Example use cases:
  • Informing users about system updates, news, or announcements.
  • Providing contextual tips, hints, or guidance during user interactions.
  • Notifying users about non-critical events or actions within the interface.
ErrorApply the Error Toast variation to alert users about errors, issues, or critical failures that require immediate attention. Example use cases:
  • Notifying users about failed operations, such as form submissions or transactions.
  • Alerting users about invalid inputs, authentication failures, or system errors.
  • Communicating errors encountered during data processing or network connectivity issues.
SuccessImplement the Success Toast variation to confirm successful actions, completion of tasks, or positive outcomes. Example use cases:
  • Confirming successful form submissions or updates.
  • Notifying users about completed processes, such as downloads, uploads, or installations.
  • Providing positive feedback for actions performed within the interface, such as saving preferences or settings.
Variant on Size
S (328px x 64px)
Utilize the Size S option for compact notifications with concise content or limited space availability.
M (504px x 64px)
Apply the Size M option for standard-sized notifications with moderate content length and visibility.
L (1032px x 64px)
Implement the Size L option for wide notifications with extensive content or enhanced visibility.


Usage

Usage Recommendation:

  • Provide a contextual message based on a user's action in the same view the action took place.
  • The message should be a concise full sentence that ends with a period.


Accessibility

Timestamp
Has Timestamp
If a toast notification needs to be dismissed, include a timestamp indicating how long the toast has been displayed.
No Timestamp
If the toast is set to automatically close after a specific time, there is no need to include the timestamp.


Content

Consistent Positioning

Place toasts in a consistent position throughout the app, it must be at the top right of the screen.

Do's
Don't
Provide Manual Dismiss Option

Add a close button so users can close the toast or dismiss the toast before the timer ends.

Do's
Don't
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:

<BToast />

Attributes

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

PropertiesData TypeDescriptionDefault Value
titleStringToast titleTitle
messageStringToast messageMessage
variantString?Variant used for change toast colordefault
sizeString?Size used for change toast widthmd
itemsToastItems[]Items for multiple Toastnone
timestring?Time description in the top right corner10 mins ago
showBoolean?If true, a toast will be showntrue
autoHideBoolean?Toast will automaticly closetrue
delayNumber?Toast will closing after delay5000

Variants

The <BToast /> component supports the following variants:

VariantDescription
defaultUtilize the Default Toast variation for general notifications, informative messages, or neutral feedback.
successImplement the Success Toast variation to confirm successful actions, completion of tasks, or positive outcomes.
errorApply the Error Toast variation to alert users about errors, issues, or critical failures that require immediate attention.

Size

The <BToast /> component supports the following sizes:

SizeDescription
smBToast width use 328px. Utilize the Size S option for compact notifications with concise content or limited space availability.
mdBToast width use 504px. Apply the Size M option for standard-sized notifications with moderate content length and visibility.
lgBToast width use 1032px. Implement the Size L option for wide notifications with extensive content or enhanced visibility.

Toast Items

The <BToast /> items must be filled, with this data:

PropertiesData TypeDescriptionDefault Value
titleStringToast titleTitle
messageStringToast messageMessage
variantString?Variant used for change toast colordefault
arrow_back
Previous Title
Next Tooltip
arrow_forward