Checkbox Field

Checkbox Field

The checkbox field stores a boolean on/off value.

Best For

  • toggles
  • optional display flags
  • show/hide switches
  • simple enable/disable behavior

Schema Example

{ "name": "showBadge", "label": "Show Badge", "type": "checkbox" }

Template Usage

{{#if showBadge}}
  <span class="badge">New</span>
{{/if}}

Modifier example:

<section class="hero {{#if highlightHero}}hero-highlighted{{/if}}">
  ...
</section>

Use It When

Use checkbox when the field represents one simple yes/no decision.

Do Not Use It When

Do not use checkbox for:

  • multi-option variants
  • freeform labels
  • repeated items

Use select, text, or repeater instead.

Technical Notes

  • use checkbox only for a single binary decision
  • prefer explicit names such as showBadge, enableForm, or highlightHero
  • avoid chaining many checkboxes when the component really needs a more explicit variant model
  • if authors are choosing between several mutually exclusive states, use select