Search documentation of phoenix_kit

# PhoenixKitWeb.Components.Core.Checkbox (phoenix_kit v1.7.87)

Copy Markdown View Source

Provides a default checkbox UI component.

## Summary

### Functions

checkbox(assigns)

Renders a checkbox.

## Functions

# checkbox(assigns)

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`.
- Global attributes are accepted. Supports all globals plus: `["readonly", "required"]`.

## Slots

- `inner_block`