Skip to content

Message

import '@sbddesign/bui-ui/message.js'
<bui-message mood="success" text="₿1,000 received."></bui-message>
<bui-message mood="caution" text="Transaction is pending."></bui-message>
<bui-message mood="danger" text="An error occured. Please try again later."></bui-message>
<bui-message text="Just an FYI, there can only be 21 million BTC."></bui-message>
PropertyAttributeTypeRequiredReflectedDescription
texttextstringNoNoMessage text content
moodmoodstringNoNoMessage mood: “neutral”, “success”, “caution”, “danger”
showIconshow-iconbooleanNoYesWhether to show an icon
iconiconstringNoNoIcon name or identifier
  • neutral - Default neutral message
  • success - Success/positive message
  • caution - Warning/caution message
  • danger - Error/danger message
  • Mood Styling: The mood property controls the visual appearance and color scheme of the message
  • Icon Display: The showIcon property controls whether an icon is displayed alongside the text
  • Custom Icons: The icon property allows you to specify which icon to display
  • Text Content: The text property contains the main message content
  • Visual Hierarchy: Different moods provide clear visual distinction for different message types

The message component does not emit custom events. It behaves as a standard HTML element for displaying messages.