Skip to main content

CamoBanner

An inline message that stays in the page until it's resolved ("Couldn't sync · Retry", a form's error summary), in a tone with its status icon (the theme's by default; icon = {} shows none). actions are usually Ghost CamoButtons, at most two, and take the banner's accent color; onDismiss adds a ✕. Tone isn't carried by color alone: the icon and the texts carry it too. A warning or error banner that appears after the page loaded is announced.

API​

public fun CamoBanner(
message: String,
modifier: Modifier = Modifier,
tone: Tone = Tone.Info,
title: String? = null,
icon: (@Composable () -> Unit)? = null,
actions: (@Composable RowScope.() -> Unit)? = null,
onDismiss: (() -> Unit)? = null,
appearance: Appearance? = null,
)
NameTypeDefault
messageStringrequired
modifierModifierModifier
toneToneTone.Info
titleString?null
icon(@Composable () -> Unit)?null
actions(@Composable RowScope.() -> Unit)?null
onDismiss(() -> Unit)?null
appearanceAppearance?null
Design notes

Why CamoBanner works this way, its states and its edge cases: contributor docs.