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
ComponentsBadgeA UI (User Interface) badge is a graphical element that is used in web or mobile interfaces to display a small piece of information, which is frequently related to user status, activity, or notifications.
Guidelines
Design
v2.5.0
Updated
Vue
v2.0.0
Updated
Flutter
v2.0.0
Updated

Anatomy

 Containers that contain labels and icons.
 Have a Label.
 Badge have a icon right label
Notes
  • Circle as an instance of the swap component
  • The use of the icon on the badge will be taken from the Material Design Icon that has been provided

Usage

Badges serve the purpose of showing numerical information, such as total items, pending tasks, or unread messages. When an interactive annotation is required, opting for a label might be more appropriate. Typically, badges are used in filtering interfaces to represent the count of selected options within a toolbar or dropdown menu.

  • Give a status update on a piece of information or action.
  • Marking something as “recommended” or “requiring attention.”
  • Highlight that an object has been recently added.
  • Highlight e.g. offers.
Usage Variant Color
VARIANTUSAGE RECOMMENDATION
Success
    Used to indicate that a process, action, or request. Example use cases:
  • Confirmation of a successful submission.
  • Completion of a task or process without errors.
  • Signifying a waiting period for a user action or response.
Secondary
    Used to indicate that a process, action, or request is pending or in progress. Example use cases:
  • Indication of a pending approval or confirmation.
  • Displaying the status of a task that is currently being processed.
  • Achievement of a milestone or goal.
Info
    Used to to denote content or items that are in a preliminary or unfinished state, typically requiring further editing or completion. Example use cases:
  • Identifying draft versions of documents or projects.
  • Marking incomplete forms or entries that need further refinement.
  • Highlighting work in progress that has not yet been finalized.
Warning
    Used to to indicate that content or elements require review or revision before finalization. Example use cases:
  • Notifying users about content that needs revision or updating.
  • Flagging errors or inconsistencies that need correction.
  • Requesting additional edits or improvements before approval.
Danger
    Used to to signify that content, actions, or requests have been declined or rejected. Example use cases:
  • Communicating rejection of submitted content or requests.
  • Indicating declined actions.
  • Denoting items that do not meet specific criteria or standards.
Neutral
    Used to represent a neutral or standard state, lacking any particular status or significance. Example use cases:
  • Displaying default or standard items without any special attributes.
  • Indicating items that are neither in progress nor completed.
  • Providing a visual distinction for items that do not fall into other predefined categories.

Accessibility

Using Icon

Used to to provide additional context or visual representation alongside the textual content of the badge. Icons can enhance understanding and recognition, particularly for users who rely on visual cues.

Using Color Reverse

Badge component offers a reverse color option, presenting an alternative bold visual style for users who prefer a more prominent display.

Color Reverse as a State

The reverse state is used to highlight information or draw special attention to a specific element within a table, especially when the table row is selected.

Color Reverse as a Variant

A badge with the reverse variant is used outside of tables to draw attention to important information or to differentiate it from the surrounding context.

Content

Use one word and use only two words if you need to describe a complex state.

Do's
Don't

Don’t use special characters as part of badge text.

Do's
Don't

Use past tense to describe the status of an action that is completed.

Do's
Don't

Each badge should only indicate one status.

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:

<BBadge />

Attributes

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

PropertyData TypeDescriptionDaefault Value
labelstring?The label text displayed on the button.Badge
variantstring?The style variant of the badgesuccess
reverseboolean ?Switches text and background colors.false
blockboolean ?Makes the badge take up the full width of its container.false

Variants

This badge component supports the following variants:

VariantDescription
successUsed to indicate that a process, action, or request is pending or in progress.
waitingUsed to indicate that a process, action, or request is pending or in progress.
draftUsed to to denote content or items that are in a preliminary or unfinished state.
reviseUsed to to indicate that content or elements require review or revision before finalization.
rejectUsed to to signify that content, actions, or requests have been declined or rejected.
neutralUsed to represent a neutral or standard state, lacking any particular status or significance.
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
labelStringDisplays text to the center of badgenull
stateUIBadgeStateA state option to display several badge variantsUIBadgeState.success
leftIconIconData?Displays the icon on the left of labelnull
reverseColorbool?A switch to make the background and label colors reversefalse
alignmentMainAxisAlignmentThe alignment labelMainAxisAlignment.center
UIBadgeState

A variant state for different state badges.

PropertiesDescription
success
Used to indicate that successfull process or action
waiting
Used to indicate that a process, action, or request is pending or in progress
draft
Used to to denote content or items that are in a preliminary or unfinished state, typically requiring further editing or completion
revise
Used to to indicate that content or elements require review or revision before finalization
reject
Used to to signify that content, actions, or requests have been declined or rejected
neutral
Used to represent a neutral or standard state, lacking any particular status or significance

Variants

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

Success

Used to indicate that a process, action, or request is submitted or done. Example use cases:

  • Confirmation of a successful submission
  • Completion of a task or process without errors
  • Achievement of a milestone or goal
 UIBadge(
   label: 'Label',
   state: UIBadgeState.success,
 )
Waiting

Used to indicate that a process, action, or request is pending or in progress. Example use cases:

  • Indication of a pending approval or confirmation
  • Displaying the status of a task that is currently being processed
  • Signifying a waiting period for a user action or response
 UIBadge(
   label: 'Label',
   state: UIBadgeState.waiting,
 )
Draft

Used to to denote content or items that are in a preliminary or unfinished state, typically requiring further editing or completion. Example use cases:

  • Identifying draft versions of documents or projects
  • Marking incomplete forms or entries that need further refinement
  • Highlighting work in progress that has not yet been finalized
 UIBadge(
   label: 'Label',
   state: UIBadgeState.draft,
 )
Revise

Used to to indicate that content or elements require review or revision before finalization. Exaxmple use cases:

  • Notifying users about content that needs revision or updating
  • Flagging errors or inconsistencies that need correction
  • Requesting additional edits or improvements before approval
 UIBadge(
   label: 'Label',
   state: UIBadgeState.revise,
 )
Reject

Used to to signify that content, actions, or requests have been declined or rejected. Example use cases:

  • Communicating rejection of submitted content or requests
  • Indicating declined actions
  • Denoting items that do not meet specific criteria or standards
 UIBadge(
   label: 'Label',
   state: UIBadgeState.reject,
 )
Neutral

Used to represent a neutral or standard state, lacking any particular status or significance. Eaxmple use cases:

  • Displaying default or standard items without any special attributes
  • Indicating items that are neither in progress nor completed
  • Providing a visual distinction for items that do not fall into other predefined categories
 UIBadge(
   label: 'Label',
   state: UIBadgeState.neutral,
 )
With Icon

Used to to provide additional context or visual representation alongside the textual content of the badge. Icons can enhance understanding and recognition, particularly for users who rely on visual cues.

  • Circle as an instance of the swap component
  • The use of the icon on the button will be taken from the Material Design Icon that has been provided
 UIBadge(
   label: 'Approve',
   state: UIBadgeState.success,
   leftIcon: Icons.check,
 )
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.
UIBadge(
   label: 'Label',
   state: { badge_state },
   colorReverse: true,
 )
arrow_back
Previous Avatar
Next Bottom Sheet
arrow_forward