Boolean inputs

Last modified: March 27th, 2024

Working with a specific static site generator?
Customize CloudCannon's documentation to suit your SSG.

Great! We'll show you documentation relevant to .
You can change this any time using the dropdown in the navigation bar.

These inputs are for editing true/false values in your data.

Checkbox#

Checkbox input for values that can be toggled.

Checkbox inputs are shown for inputs configured with the type checkbox, or for the inputs values true and false.

Screenshot of checkbox input field
Value convention
copied
show_feature: true
Value convention
copied
{
  "show_feature": true
}
Value convention
copied
show_feature = true
Input configuration
copied
featured: true
_inputs:
  featured:
    type: checkbox
Input configuration
copied
{
  "featured": true,
  "_inputs": {
    "featured": {
      "type": "checkbox"
    }
  }
}
Input configuration
copied
featured = true

[_inputs.featured]
type = "checkbox"

Switch#

Switch input for values that can be toggled.

Switch inputs are shown for inputs configured with the type switch.

Screenshot of switch input field
Input configuration
copied
featured: true
_inputs:
  featured:
    type: switch
Input configuration
copied
{
  "featured": true,
  "_inputs": {
    "featured": {
      "type": "switch"
    }
  }
}
Input configuration
copied
featured = true

[_inputs.featured]
type = "switch"

Valid values#

Documented below are the valid formats for checkbox and switch inputs.

The lists of examples are non-exhaustive.

Empty/null value:

  • is_true:

Boolean values (without any quotation marks):

  • is_true: true
  • is_true: false

Boolean values (without any quotation marks):

  • is_true = true
  • is_true = false

Null value:

  • "is_true": null

Boolean values (without any quotation marks):

  • "is_true": true
  • "is_true": false

Related Articles

Open in a new tab