StylishBadgedBox

fun StylishBadgedBox(badge: @Composable BoxScope.() -> Unit, modifier: Modifier = Modifier, content: @Composable BoxScope.() -> Unit)

A layout box that positions a badge relative to its content, wrapping the Material 3 BadgedBox so it can be themed consistently with the rest of Stylish UI.

Use this to attach a notification badge (e.g. a Badge with a count) to an icon or other anchor, typically in navigation bars, tab bars, or action rows. The badge is placed at the top-end corner of the content and may overflow it.

Parameters

badge

The badge to display, typically a Badge with a short count text. Receives a BoxScope for alignment control.

modifier

Modifier applied to the BadgedBox root.

content

The anchor content to which the badge is positioned, typically an Icon. Receives a BoxScope.

See also