> For the complete documentation index, see [llms.txt](https://docs.navigaglobal.com/writer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.navigaglobal.com/writer/6.3.3/api-reference/uicomponents/uicheckbox.md).

# UICheckbox

Create a simple checkbox

## Properties

| Name             | Type       | Default  | Description                                  |
| ---------------- | ---------- | -------- | -------------------------------------------- |
| id               | `string`   |          | **Required** - Id of the checkbox            |
| label            | `string`   |          | **Required** - The text label                |
| checked          | `boolean`  | `false`  | Wether the checkbox is checked or not        |
| disabled         | `boolean`  | `false`  | Wether the checkbox is disabled or not       |
| checkboxPosition | `string`   | `"left"` | Decide checkbox position against label       |
| onChange         | `function` |          | Callback for when the checkbox value changes |

## Example

```javascript
import {UICheckbox} from 'writer'

render($$) {
    const el = $$('div')
    return el.append(
        $$(UICheckbox, {
            id: 'myCheckbox',
            label: this.getLabel('Checky checkbox'),
            checkboxPosition: 'right'
            checked: true,
            onChange: (checked) => {
                // Do something
            }
        })
    )
}
```
