Skip to content

<sessions-banner>

A callout with a heading and a body.

Preact & React<Banner>GroupActionsDrawn asBanner

Preview

Drawn by the same renderers Sessions uses for your extension, from the DOM example beside it, without its event handlers.

When to use it

For a status the reader should notice: an outage, a success, a warning. Keep the body to a sentence.

In Preact and React, import the component of the same name from @sessions/apps/preact or @sessions/apps/react. Attributes become camelCase props, a boolean attribute is a boolean prop, and an event is an on prop that receives the event’s detail.

Attributes

Attribute
headingrequired
The bold leading label.Prop heading
tone
The banner tone.infopositivecriticalcelebrationProp tone
Example
import {Banner} from '@sessions/apps/preact';

<Banner heading="Playlist saved" tone="positive">
  Buyers see it on the session sheet.
</Banner>

In the same group