latest version

Switch

Switch option type.

Config

Name Type Default Description
on string|number "on" Specify a different value for on state.
off string|number "off" Specify a different value for off state.

DefaultValue

Name Type Default Description
value string|number "off" Any string or number type value.

Minimal Usage

{
  id: "title",
  type: "switch"
}

Usage

{
  id: "enable-title",
  type: "switch",
  config: {
    on: "yes",
    off: "no",
  },
  defaultValue: {
    value: "yes"
  }
}