Field at a glance
Input and output
Input type
Checkbox element
API output
booleanAPI response example
Field configuration options
Common use cases
- Setting whether content should be featured or highlighted on a page
- Including content in site navigation or mobile-specific display
- Enabling comments, social sharing buttons, related posts, or newsletter forms
- Indicating whether items are in stock, on sale, new, or part of a promotion
- Showing or hiding sidebars, optional themes, dark mode, breadcrumbs
Working with booleans in your application
JavaScript example
Filtering by boolean
Python example
Best practices
- Use descriptive names: The field name should clearly indicate what
Truemeans - Set appropriate defaults: Think about what the “normal” state should be:
is_featuredwould likely beFalse,include_in_shopwould likely beTrue, etc. - Provide help text: Explain what happens when the checkbox is checked
- Group related booleans: If you have many toggles, consider using components
- Don’t overuse: Too many checkboxes can be overwhelming for editors