Banner

OverviewExamplesPropertiesSlotsCSS PropertiesDependenciesUsageIntegration

Banner informs users about important changes or conditions in the interface. Use this component if you need to communicate to users in a prominent way.

Loading...

Properties

PropertyAttribute Description TypeDefault
variantvariantThe style variant of the banner.'info' | 'danger' | 'success' | 'warning''info'

Slots

Slot name Description
Default slotdefault slot

CSS Properties

CSS Custom Properties provide more fine grain control over component presentation. We advise utilizing existing properties on the component before using these.

PropertyDescriptionDefault
--n-banner-border-radiusControls how rounded the corners are, using border radius tokens.var(--n-border-radius)
--n-banner-box-shadowControls the surrounding shadow, using box shadow tokens.var(--n-box-shadow-card)

Usage

This section includes guidelines for designers and developers about the usage of this component in different contexts.

Do

  • Use this component if you need to communicate in a prominent way.
  • Place banner at the top of the section it applies to.
  • Use for highlighting errors and success statuses.
  • Put banner close to the context it’s referring to.
  • Move focus to the banner if it’s relevant to the current workflow.

Don’t

  • Move focus to banner if it appears on page load.
  • Use for highlighting general content or as a banner.
  • Use to replace an error page.

Content guidelines

Banner content should be clear, accurate and easy to understand:

We’re experiencing an incident. Please see our status page for more details.
There was an error.

When writing banner content, always write it in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):

We’re experiencing an incident.
We’re Experiencing An Incident.

Always end in punctuation:

We’re experiencing an incident.
We’re experiencing an incident

Integration

For integration guidelines, please see Web Components documentation .

Was this page helpful?

Yes No

We use this feedback to improve our documentation.