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
- Kotlin
- Dart
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,
)
| Name | Type | Default |
|---|---|---|
label | String | required |
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 |
Design notes
Why CamoChip works this way, its states and its edge cases: contributor docs.