Checkbox

Checkboxes are used in forms when users need to select multiple options from a list.

TypeResource
DesignFigma
WebWeb Storybook
CodeGitlab

Usage

import { Checkbox } from 'bio-bind-ui';
<Checkbox
  id='checkboxName'
  label='Label'
  labelPosition='right'
  mode='light'
  name='checkboxName'
  checked='true'
  onChange={() => {}}
  size='md'
  variant='primary'
/>

Examples

Checkbox Variant

Set the variant prop to primary or secondary for different style.

Checkbox Size

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


Label Position (optional)

Use labelPosition to set label right or left


Mode (optional)

Use mode to use dark or light


Props

PropsRequiredDefaultTypedescription
labeltrue-stringThe label text for the checkbox.
labelPositionfalserightleft rightThe label position to the checkbox.
stylefalse-CSSPropertiesCustom styles for the checkbox component.
modefalselightlight darkThe theme mode of the checkbox (light or dark).
idfalse-stringA unique identifier for the checkbox.
namefalse-stringName for the checkbox.
variantfalseprimaryprimary secondaryThe visual color variant of the checkbox.
sizefalsemdsm md lgThe size of checkbox.
disabledfalsefalsetrue falseIf true, checkbox will be set to disabled state
checkedfalsefalsetrue falseIf true, checkbox will be set to checked state.
isErrorfalsefalsetrue falseIf true, checkbox will be set to error state.
onChangefalse-functionCallback function to run when the checkbox is clicked.
intermediatefalsefalsetrue trueIf true, checkbox will be set to indeterminate state.
BIND © Biofarma Innovate Next-level Design .