# Boolean

> Yes/no, stored as text.

Source: CBX documentation, version 3.x (released). Canonical page: https://docs.configbox.at/docs/technical/property-types/boolean. Last updated 2026-08-02.

---
Yes/no, stored as text.

**Storage kind:** `column` · **Column:** `varchar(1)` — `'0'` or `'1'`

Use it for any genuine two-state flag. If the field is the record's publish state, use
[`published`](https://docs.configbox.at/docs/technical/property-types/published) instead — it is this type plus the list toggle. If a third state is
meaningful ("not decided yet"), a boolean is the wrong shape: use a [`dropdown`](https://docs.configbox.at/docs/technical/property-types/dropdown) with
three explicit choices rather than a nullable boolean, because "NULL means unknown" is a convention
every reader has to be told about.

## Settings

| Setting | Meaning |
|---|---|
| `default` | `0` or `1`. **Give every boolean one** |

The list gets a yes/no filter automatically when `addDropdownFilter` is set, and cells render as the
translated `CBYES` / `CBNO` rather than as `1` / `0`.

## Always declare a default

Two booleans shipped without one, and that is exactly how they ended up as nullable columns holding
neither `'0'` nor `'1'` — a third state for a two-state field, which every reader then has to guess
about. The default becomes the column default in generated DDL, so declaring it fixes both the form
and the schema.

A boolean should be `NOT NULL` with a default. If you find yourself wanting NULL, see the note at
the top: what you want is a three-valued dropdown.

@see published.md
