Checkbox
Checkboxes are used in forms when users need to select multiple options from a list.
Type | Resource |
---|---|
Design | Figma |
Mobile | Mobile Storybook |
Code | Gitlab |

Usage
To implement Checkbox, you can use this tag Checkbox
in the Kotlin file.
import id.co.biofarma.binduiandroid.components.checkbox.Checkbox
var checkboxState by remember { mutableStateOf(ToggleableState.Off) }
Checkbox(
variant = "primary",
size = "sm",
label = "Checkbox",
checked = checkboxState,
enabled = true,
indeterminate = true,
onChange = { checkboxState = it }
)
Examples
Variant
Set the variant
prop to primary
, secondary
or tertiary
for different color.

Size
Set the size
prop to sm
, md
, or lg
for different size.

Disabled
Set the enabled
prop to true
or false
.
Indeterminate (optional)
A checkbox input in a form can only have two states: checked or unchecked. It either submits its value or does not. Visually, a checkbox can appear in three states: checked, unchecked, or indeterminate.
Props
Props | Required | Default | Type | description |
---|---|---|---|---|
label | true | - | string | The label text for the checkbox. |
style | false | - | Modifier | To decorate or add behavior to Compose UI elements. |
id | false | - | string | A unique identifier for the checkbox. |
variant | false | primary | primary secondary | The visual color variant of the checkbox. |
size | false | md | sm md lg | The size of checkbox. |
enabled | false | false | true false | If false, checkbox will be set to disabled state |
selected | false | false | true false | If true, checkbox will be set to checked state. |
error | false | false | true false | If true, checkbox will be set to error state. |
onChange | false | - | function | Callback function to run when the checkbox is clicked. |
indeterminate | false | false | true true | If true, checkbox will be set to indeterminate state. |