Adaptive Card

With this type of card, application developers can visualize and reuse cards that are created using the Microsoft Adaptive Cards specification and manifest. Default and Numeric card headers can be optionally used in order to provide a title and general information about the Adaptive Card. The content of the card consist of a JSON object, which defines the card structure, content, and actions. For more information of all properties of Adaptive Card, see https://adaptivecards.io.

Usage

Example

Define the type of the card:

{
	"sap.card": {
		"type": "AdaptiveCard",
		"content": {}
	}
}

Define the content of the card by including the JSON-serialized card object model inline:

"content": {
	"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
	"type": "AdaptiveCard",
	"version": "1.0",
	"body": [
		{
			"type": "TextBlock",
			"text": "Publish Adaptive Card schema",
			"weight": "Bolder",
			"size": "Medium"
		},
		{
			"type": "ColumnSet",
			"columns": [
				{
					"type": "Column",
					"width": "auto",
					"items": [
						{
							"type": "Image",
							"url": "https://pbs.twimg.com/profile_images/3647943215/d7f12830b3c17a5a9e4afcc370e3a37e_400x400.jpeg",
							"size": "Small",
							"style": "Person"
						}
					]
				},
				{
					"type": "Column",
					"width": "auto",
					"items": [
						{
							"type": "TextBlock",
							"text": "Matt Hidinger",
							"weight": "Bolder",
							"wrap": true
						}
					]
				}
			]
		},
		{
			"type": "TextBlock",
			"text": "Now that we have defined the main rules and features of the format, we need to produce a schema and publish it to GitHub. The schema will be the starting point of our reference documentation.",
			"wrap": true
		},
		{
			"type": "FactSet",
			"facts": [
				{
					"title": "Board:",
					"value": "Adaptive Card"
				},
				{
					"title": "List:",
					"value": "Backlog"
				}
			]
		}
	],
	"actions": [
		{
			"type": "Action.ShowCard",
			"title": "Set due date",
			"card": {
				"type": "AdaptiveCard",
				"body": [
					{
						"type": "Input.Date",
						"id": "dueDate"
					}
				],
				"actions": [
					{
						"type": "Action.Submit",
						"title": "OK"
					}
				]
			}
		}
	]
}

Or load it from a JSON file:

"content": {
	"request": {
		"url": "./adaptiveCard.json"
	}
}

You could also include configuration for the Action.Submit:

{
	"sap.card": {
		"configuration": {
			"actionHandlers": {
				"submit": {
					"url": "./NorthwindSvc/formData",
					"method": "POST"
				}
			}
		},
		"type": "AdaptiveCard",
		"content": {}
	}
}

Create the view to display the card:

<mvc:View xmlns:w="sap.ui.integration.widgets">
	<w:Card manifest="./manifest.json" width="400px" height="auto"/>
</mvc:View>
Try it Out

UI5 Web Components Version

Adaptive Cards make use of customized bundle of UI5 Web Components version 1.7.0.