# Checkbox (@limerdev/zest)
A checkbox with `bind:checked`, and `bind:indeterminate` for a partly checked group. With `name` it submits with a form. Inside a `Field` it takes its id, label, description, error and disabled state from the Field; use `orientation="horizontal"` to put the label beside it.
- Category: Data input
- Import: `import { Checkbox } from '@limerdev/zest'`
- Bits UI: `Checkbox`, https://bits-ui.com/docs/components/checkbox
- Exports: `Checkbox`
- Use for: An on/off choice that takes effect when a form is submitted, or one of several independent options.
- Don't: A setting that applies at once: use `Switch`. Choosing one of several options: use `RadioGroup`. A Checkbox without a label.
```svelte
Billable
```
Props of `Checkbox`:
- `checked` (`boolean`, default `false`, bindable): The checked state of the checkbox. It can be one of: - `true` for checked - `false` for unchecked
- `disabled` (`null | false | true`, default `false`): Whether the checkbox is disabled.
- `form` (`string`, default `undefined`): The id of the form to link the checkbox button and hidden input to.
- `indeterminate` (`boolean`, default `false`, bindable): Whether the checkbox is in an indeterminate state or not.
- `name` (`any`, default `undefined`): The name of the checkbox used in form submission. If not provided, the hidden input will not be rendered.
- `onCheckedChange` (`OnChangeFn`): A callback function called when the checked state changes.
- `onIndeterminateChange` (`OnChangeFn`): A callback function called when the indeterminate state changes.
- `readonly` (`null | false | true`, default `false`): Whether the checkbox is read only. If readonly, the checkbox will be focusable by the user, but will not be able to be checked/unchecked.
- `required` (`boolean`, default `false`): Whether the checkbox is required (for form validation).
- `value` (`string`, default `undefined`): The value of the checkbox used in form submission and to identify the checkbox when in a `Checkbox.Group`. If not provided while in a `Checkbox.Group`, the checkbox will use a random identifier.
Example: Basic
Put a Checkbox and its label in a horizontal Field; clicking the label toggles it.
```svelte
Billable
```
Example: With a description
Field.Content stacks the label and its description beside the checkbox.
```svelte
Send a copy to the customerThey get the invoice as a PDF the day it is sent.
```
Example: Select all
indeterminate shows that only some of a group are checked.
```svelte
Submit hours forAll days