# `PhoenixKitWeb.Components.Core.Checkbox`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.164/lib/phoenix_kit_web/components/core/checkbox.ex#L1)

Provides a default checkbox UI component.

# `checkbox`

Renders a checkbox.

## Attributes

* `field` (`Phoenix.HTML.FormField`)
* `id` (`:any`) - Defaults to `nil`.
* `name` (`:any`)
* `label` (`:string`) - Defaults to `nil`.
* `errors` (`:list`) - Defaults to `[]`.
* `checked` (`:boolean`) - Defaults to `false`.
* `class` (`:any`) - extra classes merged onto the `<input type="checkbox">` (e.g. `checkbox-sm`, `checkbox-accent`). Defaults to `nil`.
* Global attributes are accepted. Supports all globals plus: `["readonly", "required"]`.
## Slots

* `inner_block`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
