Kwik Counter
fun KwikCounter(modifier: Modifier = Modifier, label: String? = null, initialValue: Int = 0, minValue: Int = 0, maxValue: Int = 99, disabled: Boolean = false, borderColor: Color = Color.Gray, borderStroke: Int = 0, onValueChange: (Int) -> Unit)
A counter component that allows the user to increment or decrement a value.
Parameters
label
: The label of the counter.
initial Value
: The initial value of the counter. Default is 0.
min Value
: The minimum value of the counter. Default is 0.
max Value
: The maximum value of the counter. Default is 99.
disabled
: If true, the counter will be disabled.
border Color
: The color of the border.
border Stroke
: The width of the border.
on Value Change
: The callback that will be called when the value of the counter changes.
Example usage:
KwikCounter(
label = "Counter",
initialValue = 2,
minValue = 0,
maxValue = 10,
onValueChange = {
// handle value change
}
)
Content copied to clipboard