Schema Explorer

Input.Toggle

Lets a user choose between two options.

Property Type Required Description Version
id string Yes Unique identifier for the value. Used to identify collected input when the Submit action is performed. 1.0
title string Yes Title for the toggle 1.0
type "Input.Toggle" Yes Input.Toggle 1.0
value string No, default: "false" The current selected value. If the item is selected that “valueOn” will be used, otherwise “valueOff” 1.0
valueOff string No, default: "false" The value when toggle is off 1.0
valueOn string No, default: "true" The value when toggle is on 1.0
spacing string No Controls the amount of spacing between this element and the preceding element. 1.0
separator boolean No, default: false When true, draw a separating line at the top of the element. 1.0

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

Unique identifier for the value. Used to identify collected input when the Submit action is performed.

  • Type: string
  • Required: Yes

title

Title for the toggle

  • Type: string
  • Required: Yes

type

Input.Toggle

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

value

The current selected value. If the item is selected that "valueOn" will be used, otherwise "valueOff"

  • Type: string
  • Required: No, default: "false"

valueOff

The value when toggle is off

  • Type: string
  • Required: No, default: "false"

valueOn

The value when toggle is on

  • Type: string
  • Required: No, default: "true"

spacing

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

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

separator

When true, draw a separating line at the top of the element.

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