When to use it
Cap large counts, such as 99+.
Native example
Cap large counts, such as 99+.
import androidx.compose.runtime.*
import com.santi020k.lumen.*
@Composable
fun NotificationsButton() {
var unread by remember { mutableIntStateOf(3) }
LumenFloatingBadge(count = unread) {
LumenIconButton(
name = LumenIconName.Bell,
contentDescription = "Notifications, $unread unread",
onClick = { unread = 0 },
intent = LumenButtonIntent.Outline
)
}
}Reference
The primary shared and platform-specific options exposed by LumenFloatingBadge.
| API | Values or type | Default | Description |
|---|---|---|---|
| count / max / content | number / cap / anchor | required / 99 / required | Cap large counts, such as 99+. |
Native behavior
Cap large counts, such as 99+.
Decorative by default; put the count in the anchor's name.
Shared component