1. Home
  2. Docs
  3. docs
  4. Widgets
  5. Boolean

Boolean

  • Name: boolean
  • UI: Toggle switch
  • Data type: boolean

The boolean widget translates a toggle switch input to a true or false value.

Widget Options

For common options, see Common widget options.

Name

Type

Default

Description

default

boolean

false

Optional. The default value for the field

prefix

string

''

Optional. Text to show before toggle switch

suffix

string

''

Optional. Text to show after toggle switch

Example

name: draft
label: Draft
widget: boolean
default: true
name: 'draft',
label: 'Draft',
widget: 'boolean',
default: true,