Checkbox list components for Pure Admin.
Provides checkbox_list/1 container, checkbox_list_item/1 for individual items,
and checkbox_box/1 as a low-level checkbox building block (for tables, etc.).
Summary
Functions
Renders a low-level checkbox (input + box) without label text.
Renders a checkbox list container.
Renders a checkbox list item with label, optional description, and actions.
Functions
Renders a low-level checkbox (input + box) without label text.
Used as a building block in tables, checkbox lists, and other composite components.
Examples
<.checkbox_box id="select-row-1" checked={@row.checked} phx-click="toggle_row" phx-value-id="1" />Attributes
id(:string) - Defaults tonil.name(:string) - Defaults tonil.value(:string) - Defaults to"true".checked(:boolean) - Defaults tofalse.disabled(:boolean) - Defaults tofalse.is_indeterminate(:boolean) - Indeterminate/partial state (requires PureAdminCheckbox hook). Defaults tofalse.is_x_mark(:boolean) - X mark instead of checkmark. Defaults tofalse.size(:string) - Defaults tonil.Must be one ofnil,"xs","sm","lg", or"xl".class(:string) - Defaults tonil.- Global attributes are accepted. Supports all globals plus:
["phx-click", "phx-change", "phx-value-id"].
Renders a checkbox list container.
Examples
<.checkbox_list>
<.checkbox_list_item id="opt1" label_text="Option 1" />
<.checkbox_list_item id="opt2" label_text="Option 2" checked />
</.checkbox_list>
<.checkbox_list variant="bordered" layout="2col">
...
</.checkbox_list>Attributes
variant(:string) - Defaults tonil.Must be one ofnil,"compact","bordered", or"striped".layout(:string) - Defaults tonil.Must be one ofnil,"inline","grid","2col", or"3col".class(:string) - Defaults tonil.- Global attributes are accepted.
Slots
inner_block(required)
Renders a checkbox list item with label, optional description, and actions.
Examples
<.checkbox_list_item id="feat1" label_text="Email Notifications" description_text="Receive updates via email" />
<.checkbox_list_item id="task1" label_text="Complete proposal" checked>
<:actions>
<.button size="xs" variant="danger" is_icon_only>🗑️</.button>
</:actions>
</.checkbox_list_item>Attributes
id(:string) (required)label_text(:string) (required)description_text(:string) - Defaults tonil.state(:string) - Defaults tonil.Must be one ofnil,"disabled", or"locked".checked(:boolean) - Defaults tofalse.disabled(:boolean) - Defaults tofalse.class(:string) - Defaults tonil.- Global attributes are accepted. Supports all globals plus:
["phx-click", "phx-change", "phx-value-id"].
Slots
actions- Action buttons for the item.