Skip to content

Checkbox

<checkbox>
Components.checkbox(...)

The checkbox component represents a toggleable checkbox. It can display text alongside the checkbox.

Parameters:

  • text: The text to display next to the checkbox.
  • checked: Whether the checkbox is checked or not.
  • active: Whether the checkbox is active or not.

Example (Code-driven):

Components.checkbox(Text.literal("Option"))
    .checked(false)

Example (Data-driven):

<checkbox>
    <text>Option</text>
    <checked>true</checked>
    <active>false</active>
</checkbox>

Last update: 2025-02-03