Input.Toggle

Input.Toggle collects a true/false response from the user

Property Type Required Description
id string Yes Id for the value (will be used to identify collected input when SUBMIT is clicked)
title string Yes Title for the toggle
type "Input.Toggle" No Input.Toggle
value string No The current selected value (default:false)
valueOff string No The value when toggle is off (default:false)
valueOn string No The value when toggle is on (default:true)
spacing string No Controls the amount of spacing between this element and the previous element.
separator boolean No, default: false The Separator object type describes the look and feel of a separation line between two elements.

Example

{
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "1.0",
    "body": [
        {
            "type": "TextBlock",
            "text": "Toggle Input"
        },
        {
            "type":"Input.Toggle",
            "id": "acceptTerms",
            "title": "I accept the terms and agreements",
            "value": "true",
            "valueOn": "true",
            "valueOff": "false"
        }
    ],
    "actions": [
        {
            "type": "Action.Submit",
            "title": "OK"
        }
    ]
}
{ "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "type": "AdaptiveCard", "version": "1.0", "body": [ { "type": "TextBlock", "text": "Toggle Input" }, { "type":"Input.Toggle", "id": "acceptTerms", "title": "I accept the terms and agreements", "value": "true", "valueOn": "true", "valueOff": "false" } ], "actions": [ { "type": "Action.Submit", "title": "OK" } ] }
Try it Yourself ยป

Properties

id

Id for the value (will be used to identify collected input when SUBMIT is clicked)

  • Type: string
  • Required: Yes

title

Title for the toggle

  • Type: string
  • Required: Yes

type

Input.Toggle

  • Type: "Input.Toggle"
  • Required: No
  • Allowed values:
    • Input.Toggle

value

The current selected value (default:false)

  • Type: string
  • Required: No

valueOff

The value when toggle is off (default:false)

  • Type: string
  • Required: No

valueOn

The value when toggle is on (default:true)

  • Type: string
  • Required: No

spacing

Controls the amount of spacing between this element and the previous element.

  • Type: string
  • Required: No
  • Allowed values:
    • "none"
    • "small"
    • "default"
    • "medium"
    • "large"
    • "extraLarge"
    • "padding"

separator

The Separator object type describes the look and feel of a separation line between two elements.

  • Type: boolean
  • Required: No, default: false