Skip to content

Inline Banner ​

A banner that shows a message inside a page or section. It has a header (title), a text (description), an optional icon, optional actions in the default slot and an optional close button.

Design ​

All types share the same text styles. The header and description colors are the same for every type.

PartTypography tokenSpecColor token
Headertypo-body-mediumInter 450, 12px / 16px--color-content-primary
Descriptiontypo-body-xsmall-tightInter 450, 10px / 12px--color-content-tertiary

There is no gap between the header and the description.

TypeBackgroundBorderIcon colorPadding, radius
(none)--color-background-neutral-subtle--color-border-neutral-subtle--color-content-secondarydefault
informativetransparentnone--color-content-informative-secondary8px / 12px, no radius
success--color-background-positive-subtle--color-border-positive-subtle--color-content-positive-secondarydefault
warning--color-background-warning-subtle--color-border-warning-subtle--color-content-warning-secondarydefault
error--color-background-negative-subtle--color-border-negative-subtle--color-content-negative-secondarydefault

The icon is 16px, centered horizontally in a 20px wide container, with 8px (--space-component-gap-small) between the container and the content. The informative icon is the outline phosphor/info.

Props ​

PropTypeDefaultDescription
type"informative" | "success" | "warning" | "error"-Banner style. Without it the banner is neutral
titlestring-Header
descriptionstring-Text below the header
iconicon nameby typeReplaces the icon of the type (phosphor/info for neutral and informative)
noIconbooleanfalseHides the icon
hasCloseButtonbooleanfalseShows a close button, emits close

The default slot holds actions (usually SCAButton) below the text. Without actions nothing is rendered for them, so there is no extra gap below the text.

Placement ​

The informative banner has no box: its 8px top and bottom and 12px left and right padding (--space-component-padding-small / --space-component-padding-medium) match a section's inset. Put it in a container with no padding of its own, such as a padding-less section.

Default ​

Informative ​

Success ​

Warning ​

Error ​

No Icon ​