When to use it
It never truncates; validate the limit on submit.
Native example
It never truncates; validate the limit on submit.
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.runtime.*
import com.santi020k.lumen.*
@Composable
fun BioField() {
var bio by remember { mutableStateOf("") }
Column(verticalArrangement = Arrangement.spacedBy(LumenSpacing.Xs)) {
LumenTextarea(value = bio, onValueChange = { bio = it }, label = "Bio", minLines = 3)
LumenCharacterCount(text = bio, max = 160)
}
}Reference
The primary shared and platform-specific options exposed by LumenCharacterCount.
| API | Values or type | Default | Description |
|---|---|---|---|
| max / value / announceAt | limit / current text / thresholds | required / required / 20, 10, 0 | It never truncates; validate the limit on submit. |
Native behavior
It never truncates; validate the limit on submit.
Counts graphemes and announces only at thresholds and at the limit.
Shared component