Jenga Badge
fun JengaBadge(text: String, modifier: Modifier = Modifier, tone: JengaBadgeTone = JengaBadgeTone.Neutral, colors: JengaBadgeColors = JengaBadgeDefaults.colors(tone), shape: Shape = JengaBadgeDefaults.shape, contentPadding: PaddingValues = JengaBadgeDefaults.contentPadding, textStyle: TextStyle = JengaBadgeDefaults.textStyle)(source)
A small status/label pill. The text is shown as written.
Parameters
text
the badge label.
modifier
the Modifier for this badge.
tone
the semantic tone; see JengaBadgeTone.
colors
the color set; defaults to JengaBadgeDefaults.colors for tone.
shape
the badge shape.
content Padding
padding inside the badge.
text Style
the label text style.
Samples
JengaBadge(
text = "Valid",
tone = JengaBadgeTone.Success,
)Content copied to clipboard
fun JengaBadge(text: AnnotatedString, modifier: Modifier = Modifier, tone: JengaBadgeTone = JengaBadgeTone.Neutral, colors: JengaBadgeColors = JengaBadgeDefaults.colors(tone), shape: Shape = JengaBadgeDefaults.shape, contentPadding: PaddingValues = JengaBadgeDefaults.contentPadding, textStyle: TextStyle = JengaBadgeDefaults.textStyle)(source)
A small status/label pill with styled text (e.g. a bold count).
Parameters
text
the badge label.
modifier
the Modifier for this badge.
tone
the semantic tone; see JengaBadgeTone.
colors
the color set; defaults to JengaBadgeDefaults.colors for tone.
shape
the badge shape.
content Padding
padding inside the badge.
text Style
the label text style.