Skip to main content

Module banner

Module banner 

Source
Expand description

Banner — persistent inline status strip (info / success / warning / error).

A non-transient, full-width callout for app-level conditions: deprecation notices, “you have unsaved changes”, trial-expiry warnings, license issues, restored-from-cache notices, etc. Distinct from Snackbar (transient, corner-anchored) and MessageBox (modal).

Banner::warning(tr!(unsaved_changes()))
    .description(tr!(close_loses_changes()))
    .action(Button::new(tr!(save_now()))
        .on_activate_fn(|ctx| ctx.send_intent(AppIntent::SaveNow)))
    .on_dismiss(|ctx| ctx.send_intent(AppIntent::DismissBanner))

Structs§

Banner
A persistent inline status strip.

Enums§

BannerSeverity
Banner severity level. Drives the surface tint, glyph color, and glyph shape. Apps with a “neutral” callout requirement should use a Card instead.