Jenga Chip
A compact, toggleable chip for filters and selections.
Parameters
the chip text.
whether the chip is currently selected.
called when the chip is tapped.
the Modifier for this chip.
whether the chip is interactive.
optional icon before the label (inherits the content color).
the chip shape; defaults to JengaChipDefaults.shape.
the color set; defaults to JengaChipDefaults.colors.
optional slot after the label (e.g. a count); inherits the content color.
the label text style.
the label text style while selected; defaults to textStyle with the theme's JengaChipStyle.selectedTextStyle merged on top.
the minimum visual height; defaults to the theme's JengaChipStyle.minHeight, else JengaChipDefaults.MinHeight.
padding inside the chip.
the gap between the leading icon, the label and the trailing content.
Samples
var selected by remember {
mutableStateOf(
value = false,
)
}
JengaChip(
label = "Music",
selected = selected,
onClick = { selected = !selected },
)