# Checkbox ## Example ```svelte

Primary

Secondary

With Label

``` ## Documentation ## Usage ```svelte ``` ## Sources This component uses the bits-ui component: Checkbox, see here for the documentation for that: https://bits-ui.com/docs/components/checkbox/llms.txt ## API Reference ### Checkbox A control that allows the user to toggle between checked and not checked. | Prop | Type | Default | Description | |------|------|---------|-------------| | checked | `boolean` | `false` | The checked state of the checkbox. (bindable) | | indeterminate | `boolean` | `false` | Whether the checkbox is in an indeterminate state. (bindable) | | variant | `'primary' | 'secondary'` | `'primary'` | The visual variant of the checkbox. | | sizeVariant | `'default' | 'sm' | 'lg'` | `'default'` | The size of the checkbox. | | disabled | `boolean` | `false` | Whether the checkbox is disabled. | | required | `boolean` | `false` | Whether the checkbox is required. | | name | `string` | `-` | The name of the checkbox used in form submission. | | value | `string` | `-` | The value of the checkbox used in form submission. | | onCheckedChange | `(checked: boolean) => void` | `-` | A callback invoked when the checked state changes. | | onIndeterminateChange | `(indeterminate: boolean) => void` | `-` | A callback invoked when the indeterminate state changes. | | class | `string` | `-` | Additional CSS classes to apply. | | ref | `HTMLElement` | `-` | The underlying DOM element. You can bind to this to get a reference to the element. (bindable) |