Compose Chip TextField
A Material-free chip input field for Compose Multiplatform. Built entirely on Compose Foundation — works with Material 2, Material 3, or any custom design system.

Platforms
| Android | iOS | Desktop (JVM) | Web (Wasm) |
|---|
| ✓ | ✓ | ✓ | ✓ |
Screenshots
Installation
dependencies {
implementation("io.github.aldefy:chip-textfield:1.0.0-alpha01")
}
Quick Start
val state = rememberChipTextFieldState<String>()
ChipTextField(
state = state,
onCreateChip = { text -> text.ifBlank { null } },
placeholder = { Text("Type and press Enter...") },
)
API
ChipTextField
Chip Customization
Three levels of customization:
1. Slot icons — add leading/trailing content to the default chip:
ChipTextField(
state = state,
onCreateChip = { },
chipLeadingIcon = {
Icon(imageVector = Icons.Default.Tag, contentDescription = null)
},
chipTrailingIcon = {
Icon(
imageVector = Icons.Default.Close,
contentDescription = "Remove",
modifier = Modifier.clickable(onClick = onRemove),
)
},
)
2. Full chip content — replace the entire chip rendering:
ChipTextField(
state = state,
onCreateChip = { },
chipContent = { chip, onRemove ->
Row(
modifier = Modifier
.clip(RoundedCornerShape(16.dp))
.background(Color.LightGray)
.padding(horizontal = 12.dp, vertical = 6.dp),
) {
Text(chip.toString())
Icon(
Icons.Default.Close,
contentDescription = "Remove",
modifier = Modifier.clickable(onClick = onRemove),
)
}
},
)
3. Colors and shape — customize the default chip appearance:
ChipTextField(
state = state,
onCreateChip = { },
colors = ChipTextFieldDefaults.colors(
chipBackgroundColor = Color(0xFFE3F2FD),
chipTextColor = Color(0xFF1565C0),
chipBorderColor = Color(0xFF90CAF9),
),
shape = RoundedCornerShape(12.dp),
)
ChipScope
The scope received by chipLeadingIcon and chipTrailingIcon:
class ChipScope<T>(
val chip: T,
val enabled: Boolean,
val colors: ChipTextFieldColors,
val onRemove: () -> Unit,
)
ChipTextFieldState
val state = rememberChipTextFieldState<String>()
val state = rememberChipTextFieldState(
initialChips = listOf("Kotlin", "Compose")
)
state.chips
state.addChip(chip)
state.removeChip(chip)
state.removeChipAt(index)
state.clearChips()
Features
Examples
The sample app includes 6 examples:
Run the sample:
./gradlew :sample:installDebug
./gradlew :sample:run
Building
./gradlew :chip-textfield:build
./gradlew :chip-textfield:allTests
./gradlew :chip-textfield:apiCheck
./gradlew :chip-textfield:publishAllPublicationsToLocalStagingRepository \
-Psigning.gnupg.keyName=YOUR_KEY_ID
License
Copyright 2026 Adit Lal
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http:
Unless applicable law agreed to writing, software
distributed under the License distributed an BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express implied.
See the License the specific language governing permissions
limitations under the License.