Description

A notice strip with an icon tile, a title and badge, a message, an action and a dismiss button

A Banner is a notice the user should read but does not have to answer: an IconTile saying what kind of notice it is, a title with an optional badge, a message under it, an action at the far end and a dismiss button after that.

It is a plain IComponent, so it renders wherever you put it — at the top of a page, in a card, above a list. It is also what a Toast floats over the page: Toast().Show(banner) shows the same strip in both places.

For a larger, centred empty-state block with an illustration, use Message; for a persistent inbox of notices, Notification Center.

Usage

Create one with Banner(title, message) — either argument may be left out and filled in later with SetTitle / SetText, each of which also takes a component.

Secondary() (the default), Primary(), Success(), Warning() and Danger() pick the tone, or pass a BannerStyle to Style(...). Every colour the strip draws is derived from that one accent: the wash behind it, its border, the tile, the badge and the text. Each tone brings a default icon, which any SetIcon call replaces, and NoIcon() drops the tile altogether.

Action(text, onClick) puts a button at the far end in the banner's own tone; the Action(IComponent) overload takes whatever you build instead. OnDismiss(onDismiss, hide: true) shows the dismiss button and takes the banner out of the page when it is pressed — pass hide: false when something else removes it — and Dismiss() does the same from code. Compact() tightens the strip and Flat() drops the rounding and side rules, for one pinned edge to edge across a page.

A title or message with nothing the line breaker can break at — a path, a URL, an id — breaks mid-run rather than growing the strip past its content box and running under the dismiss button.

API reference

enum

BannerStyle

public enum BannerStyle

The tone a Banner is drawn in - the same set of tones a Button has, so a banner and the button that answers it can be told to mean the same thing.

Namespace
Tesserae

Values

NameDescription
SecondaryThe neutral tone: something the user should know, drawn in the page's own colors.
PrimaryThe accent tone: something worth pointing at, drawn in the theme's primary color.
SuccessSomething that went right.
WarningSomething that needs care but hasn't failed.
DangerSomething that failed, or that will if it is left alone.
Value
BannerStyle.Secondary
Secondary

The neutral tone: something the user should know, drawn in the page's own colors.

Value
BannerStyle.Primary
Primary

The accent tone: something worth pointing at, drawn in the theme's primary color.

Value
BannerStyle.Success
Success

Something that went right.

Value
BannerStyle.Warning
Warning

Something that needs care but hasn't failed.

Value
BannerStyle.Danger
Danger

Something that failed, or that will if it is left alone.

See also

© 2026 Curiosity. All rights reserved.