Lowdefy
v3.17.2/input/Switch/

Switch

value type: boolean

The Switch block is an on/off input. It has a boolean value (true/false).

block_id: false

id: block_id
type: Switch

properties:
Autofocus to the block on page load.
Name of an Ant Design Icon or properties of an Icon block to customize icon to shown when switch is checked (true).
Text to shown when switch is checked (true).
-------
Switch checked color.
Disable the block if true.
Css style to applied to input.
label:
Align label left or right when inline.
Append label with colon.
Hide input label.
Extra text to display beneath the content.
Css style to applied to label extra.
Css style to applied to label feedback.
Display feedback extra from validation, this does not disable validation.
Render input and label inline.
Label inline span.
Label title.
Size of the block.
Title to describe the input component, if no title is specified the block id is displayed.
Name of an Ant Design Icon or properties of an Icon block to customize icon to shown when switch is unchecked (false).
Text to shown when switch is not checked (false).
type: object
properties:
  events:
    additionalProperties: false
    properties:
      onChange:
        description: Trigger action when switch is changed.
        type: array
    type: object
  properties:
    additionalProperties: false
    properties:
      autoFocus:
        default: false
        description: Autofocus to the block on page load.
        type: boolean
      checkedIcon:
        default: CheckOutlined
        description: >-
          Name of an Ant Design Icon or properties of an Icon block to customize
          icon to shown when switch is checked (true).
        type:
          - string
          - object
      checkedText:
        description: Text to shown when switch is checked (true).
        type: string
      color:
        description: Switch checked color.
        type: string
      disabled:
        default: false
        description: Disable the block if true.
        type: boolean
      inputStyle:
        description: Css style to applied to input.
        type: object
      label:
        additionalProperties: false
        description: Label properties.
        properties:
          align:
            default: left
            description: Align label left or right when inline.
            enum:
              - left
              - right
            type: string
          colon:
            default: true
            description: Append label with colon.
            type: boolean
          disabled:
            default: false
            description: Hide input label.
            type: boolean
          extra:
            description: Extra text to display beneath the content.
            type: string
          extraStyle:
            description: Css style to applied to label extra.
            type: object
          feedbackStyle:
            description: Css style to applied to label feedback.
            type: object
          hasFeedback:
            default: true
            description: >-
              Display feedback extra from validation, this does not disable
              validation.
            type: boolean
          inline:
            default: false
            description: Render input and label inline.
            type: boolean
          span:
            description: Label inline span.
            type: number
          title:
            description: Label title.
            type: string
        type: object
      size:
        default: default
        description: Size of the block.
        enum:
          - small
          - default
        type: string
      title:
        description: >-
          Title to describe the input component, if no title is specified the
          block id is displayed.
        type: string
      uncheckedIcon:
        default: CloseOutlined
        description: >-
          Name of an Ant Design Icon or properties of an Icon block to customize
          icon to shown when switch is unchecked (false).
        type:
          - string
          - object
      uncheckedText:
        description: Text to shown when switch is not checked (false).
        type: string
    type: object