Static CMS
Star StaticJsCMS/static-cms on GitHub
v4.3.0DocsExamplesDemoCommunity

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.

NameTypeDefaultDescription
defaultbooleanfalseOptional. The default value for the field
prefixstring''Optional. Text to show before toggle switch
suffixstring''Optional. Text to show after toggle switch

Example

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