Skip to main content

CamoChip

A compact element whose callbacks decide its kind: a filter when selected is set (it toggles through onClick), an input chip with a remove button when onRemove is set, an action chip with onClick only, and a static tag with none (a status word in a tone: Soft + Success "Paid"). A focused input chip is also removed with Backspace or Delete. Counts and dots are CamoBadges, not chips.

API​

public fun CamoChip(
label: String,
modifier: Modifier = Modifier,
onClick: (() -> Unit)? = null,
selected: Boolean? = null,
onRemove: (() -> Unit)? = null,
leading: (@Composable () -> Unit)? = null,
appearance: Appearance? = null,
tone: Tone = Tone.Default,
enabled: Boolean = true,
interactionSource: MutableInteractionSource? = null,
)
NameTypeDefault
labelStringrequired
modifierModifierModifier
onClick(() -> Unit)?null
selectedBoolean?null
onRemove(() -> Unit)?null
leading(@Composable () -> Unit)?null
appearanceAppearance?null
toneToneTone.Default
enabledBooleantrue
interactionSourceMutableInteractionSource?null
Design notes

Why CamoChip works this way, its states and its edge cases: contributor docs.