Banner

Keep page-wide information visible at the top of the screen.

Live preview
Interact with the component to see results here.
View code
HTML
<sy-banner-message
  variant="info"
  header="Service notice"
  message="Your changes have been applied."
  showicon
  closable
></sy-banner-message>

Usage guide

#

Use for page-wide notices, such as maintenance or important policies. Toast is better for brief completion feedback.

Key message
Put the main point in header and details in message.
Follow-up action
Place a related action in the footer slot. Enable closable only for notices users may dismiss.

Feature examples

#

Choose a feature from 10 topics. Explore property settings, method calls, event results, and slot layouts through live examples and code.

Usage examples · Overview

Try the selected example. Topics with multiple configurations let you switch between detailed examples.

View code
HTML
Loading the example.

Property · Closable

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Header

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Message

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Neutral Icon

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Show Icon

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Slot Message

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Variant

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Usage examples · Success notice

Confirm that changes were applied with a success banner.

View code
HTML
<sy-banner-message
  variant="success"
  header="Service notice"
  message="Your changes have been applied."
  showicon
  closable
  id="supplement-1"
></sy-banner-message>

<script type="module">
  const component1 = document.querySelector("#supplement-1");
  Object.assign(component1, {
    "variant": "success"
  });
</script>

API reference

#

Hover over a name or focus it with the keyboard to see the code. On touch screens, tap the name.

<sy-banner-message>

Properties

Attribute / PropertyTypeDefaultDescription
booleanfalseShow the close button.
booleanfalseShow the status icon.
string''SVG string for the neutral state.
string''Help text about the input state.
string''Notification title.
'info' | 'success' | 'warning' | 'error' | 'neutral''info'Component display style.

Slots

SlotDescription
Component body or child items.
Content displayed in the footer area.