Banner Component

The ds-banner component provides a fixed notification banner for displaying alerts, warnings, or informational messages.

ds-banner uses the following components internally:

  • ds-text - For rendering banner text and action labels with i18n support
  • ds-button - For action buttons (optional)
<ds-banner text="Welcome Message" variant="info"></ds-banner>
<ds-banner text="Warning Message" variant="warning"></ds-banner>
<ds-banner text="Info Message" variant="info"></ds-banner>
<ds-banner text="Success Message" variant="success"></ds-banner>
<ds-banner text="Error Message" variant="error"></ds-banner>
<ds-banner
text="Issue Report"
action="Contact Us"
variant="warning"
></ds-banner>
AttributeTypeDefaultDescription
textstring-Translation text for banner text
actionstring-Translation text for action button
variantstring'warning'Banner style: warning, info, success, error
hrefstring-Link URL for the action
mailtostring-Email address for mailto link
subjectstring-Translation text for email subject
versionstring-Version number to display on click

The banner responds to translation changes and updates automatically when the language changes.

The banner is fixed to the top of the viewport and spans the full width:

:host {
position: absolute;
top: 0;
left: 0;
right: 0;
}