Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The adaptive card body contains your specific arrangement of UI elements so you can define the look and feel of your Dragon Copilot extension. This article provides the list of available UI elements and their specifications in the VisualizationResource JSON.
If you include any adaptive card elements not listed on this page, the card won't be displayed. Instead of using unsupported elements, try the following:
Actions other than copy: Use an actions array at the
adaptive_card_payloadlevel of the VisualizationResource JSON.Web links: Use a references array at the root level of the VisualizationResource JSON. Set the type to
"Web".Images, videos, and other inputs: Contact your Dragon Copilot representative for information.
Example JSON
This snippet illustrates one example of each UI element:
"body": [
{
"type": "Container",
"spacing": "None|ExtraSmall|Small|Default|Medium|Large|ExtraLarge|Padding",
"style": "default|emphasis|accent|good|attention|warning",
"items": [...] // array of UI element objects
},
{
"type": "ColumnSet",
"spacing": "None|ExtraSmall|Small|Default|Medium|Large|ExtraLarge|Padding",
"columns": [ // one or more columns
{
"type": "Column",
"width": <number>|"auto|stretch|<number>px",
"spacing": "None|ExtraSmall|Small|Default|Medium|Large|ExtraLarge|Padding",
"items": [...] // array of UI element objects
}
]
},
{
"type": "TextBlock",
"text": "Text to display.",
"weight": "Default|Lighter|Bolder",
"size": "Default|Small",
"wrap": "true|false",
"spacing": "None|ExtraSmall|Small|Default|Medium|Large|ExtraLarge|Padding"
},
{
"type": "FactSet",
"facts": [ // one or more title-value pairs
{
"title": "Text to display",
"value": "Text to display"
}
],
"spacing": "None|ExtraSmall|Small|Default|Medium|Large|ExtraLarge|Padding"
},
{
"type": "Input.ChoiceSet",
"choices": [ // one or more choices
{
"title": "Text to display",
"value": "Text to display"
}
],
"id": "<element or action ID>",
"isMultiSelect": "true|false",
"value": "<default value>",
"style": "compact|expanded",
"spacing": "None|ExtraSmall|Small|Default|Medium|Large|ExtraLarge|Padding"
},
{
"type": "ActionSet",
"actions": [ // must be a single copy action
{
"type": "Action.Submit",
"title": "Text to display",
"style": "positive",
"iconUrl": "<icon URL>",
"data": {
"action": "copy",
"actionType": "copy",
"code": "<string>"
}
}
],
"spacing": "None|ExtraSmall|Small|Default|Medium|Large|ExtraLarge|Padding"
}
]
| Element type | Description |
|---|---|
Container |
Container for other elements. Use containers for styling purposes or to logically group a set of elements together. |
ColumnSet |
Container for Column elements, to organize a card into vertical columns. |
Column |
An individual column within a ColumnSet element. |
TextBlock |
Displays formatted text. Useful for headings, paragraphs, and labels. |
FactSet |
Container for Fact elements. Displays a series of title and value pairs in a simple table layout. This is useful for displaying structured data. You can also use this for bulleted lists by adding • before the title. |
Input.ChoiceSet |
Displays single- or multiselect choice inputs. |
ActionSet |
Container for an Action.Submit button. This can contain exactly one Action.Submit element, which must be assigned a copy action. |
Action.Submit |
The action button within an ActionSet element. This must have an ActionSet as the parent element and can only be assigned a copy action. |
Container
Properties of the Container object:
| Name | Type | Required | Description |
|---|---|---|---|
type |
String | Yes | Must be Container. |
spacing |
String | No | The amount of space between this element and the previous one. No spacing is applied to the first element in a container. Valid values: None, ExtraSmall, Small, Default, Medium, Large, ExtraLarge, Padding |
style |
String | No | Applies a container style. Container styles control the colors of the background, border, and text in such a way that contrast requirements are always met. Valid values: default, emphasis, accent, good, attention, warning |
items |
Array of elements | No | The elements in the container. Valid values: ActionSet, ColumnSet, Container, FactSet, Input.ChoiceSet, TextBlock |
Column set
Properties of the ColumnSet object:
| Name | Type | Required | Description |
|---|---|---|---|
type |
String | Yes | Must be ColumnSet. |
spacing |
String | No | The amount of space between this element and the previous one. No spacing is applied to the first element in a container. Valid values: None, ExtraSmall, Small, Default, Medium, Large, ExtraLarge, Padding |
columns |
Array of column elements | No | The columns in the set. Valid values: Column |
Column
Properties of the Column object:
| Name | Type | Required | Description |
|---|---|---|---|
type |
String | Yes | Must be Column. |
width |
String, number | No | The width of the column. If expressed as a number, this represents the relative weight of the column in the set. If expressed as a string, valid values are: - auto: Automatically adjusts the column's width according to its content.- stretch: The column uses the remaining horizontal space. If multiple columns are set to stretch, the space is shared between them.- <number>px: An explicit width in pixels. |
spacing |
String | No | The amount of space between this element and the previous one. No spacing is applied to the first element in a container. Valid values: None, ExtraSmall, Small, Default, Medium, Large, ExtraLarge, Padding |
items |
Array of elements | No | The elements in the column. Valid values: ActionSet, ColumnSet, Container, FactSet, Input.ChoiceSet, TextBlock |
Text block
Properties of the TextBlock object:
| Name | Type | Required | Description |
|---|---|---|---|
type |
String | Yes | Must be TextBlock. |
text |
String | Yes | The text to display. |
weight |
String | No | Text weight. Valid values: Default, Lighter, Bolder |
size |
String | No | Text size. Valid values: Default, Small |
wrap |
Boolean | No | Whether the text wraps. Valid values: true, false |
spacing |
String | No | The amount of space between this element and the previous one. No spacing is applied to the first element in a container. Valid values: None, ExtraSmall, Small, Default, Medium, Large, ExtraLarge, Padding |
Fact set
Properties of the FactSet object:
| Name | Type | Required | Description |
|---|---|---|---|
type |
String | Yes | Must be FactSet. |
facts |
Array of objects | Yes | The facts in the set, as title-value pairs. |
spacing |
String | No | The amount of space between this element and the previous one. No spacing is applied to the first element in a container. Valid values: None, ExtraSmall, Small, Default, Medium, Large, ExtraLarge, Padding |
Fact objects:
| Name | Type | Required | Description |
|---|---|---|---|
title |
String | Yes | The fact's title. |
value |
String | Yes | The fact's value. |
Choice set
Properties of the Input.ChoiceSet object:
| Name | Type | Required | Description |
|---|---|---|---|
type |
String | Yes | Must be Input.ChoiceSet. |
choices |
Array of objects | Yes | The choices associated with the input. |
id |
String | Yes | A unique identifier for the element or action. |
isMultiSelect |
Boolean | No | Whether multiple choices can be selected. Valid values: true, false |
value |
String | No | The default value of the input. |
style |
String | No | How the input is displayed. Valid values: - compact: A dropdown list.- expanded: A list of radio buttons or checkboxes. |
spacing |
String | No | The amount of space between this element and the previous one. No spacing is applied to the first element in a container. Valid values: None, ExtraSmall, Small, Default, Medium, Large, ExtraLarge, Padding |
Choice objects:
| Name | Type | Required | Description |
|---|---|---|---|
title |
String | Yes | The text to display for the choice. |
value |
String | Yes | The value associated with the choice. |
Action set
Properties of the ActionSet object:
| Name | Type | Required | Description |
|---|---|---|---|
type |
String | Yes | Must be ActionSet. |
actions |
Array of Action.Submit objects |
Yes | The action in the set. Only one action can be included in the array, and its data property must correspond to a copy action. |
spacing |
String | No | The amount of space between this element and the previous one. No spacing is applied to the first element in a container. Valid values: None, ExtraSmall, Small, Default, Medium, Large, ExtraLarge, Padding |
Action submit
Properties of the Action.Submit object:
| Name | Type | Required | Description |
|---|---|---|---|
type |
String | Yes | Must be Action.Submit. |
title |
String | Yes | The title of the action, as it appears on the UI button. Maximum of 50 characters. |
style |
String | Yes | Must be positive. |
iconUrl |
String | No | URL for an image to display on the left of the action's title. |
data |
Object | Yes | Must be: {"action": "copy", "actionType": "copy", "code": "<string>"} |