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
- Kotlin
- Dart
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,
)
| Name | Type | Default |
|---|---|---|
message | String | required |
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 |
Design notes
Why CamoBanner works this way, its states and its edge cases: contributor docs.