Sure here you can find the Sample. As you can see I have a Container that contains 1 image and 1 text (1 slide) and I manage the visiblity of all components at the level of Container and then with the ToggleVisiblity -> targetElements I manage when present each container.
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.4",
"body": [
{
"type": "TextBlock",
"text": "Here are some cool photos",
"size": "Large",
"wrap": true
},
{
"type": "TextBlock",
"text": "Sorry some of them are repeats",
"size": "Medium",
"weight": "Lighter",
"wrap": true
},
{
"type": "Container",
"items": [
{
"type": "ImageSet",
"images": [
{
"type": "Image",
"url": "${value[0].contentUrl}",
"altText": "${value[0].name}",
"size": "Medium",
"id": "img1"
}
]
},
{
"type": "TextBlock",
"text": "Some text",
"wrap": true
},
{
"type": "ActionSet",
"actions": [
{
"type": "Action.ToggleVisibility",
"title": "Next image",
"targetElements": [
{
"elementId": "container2",
"isVisible": true
},
{
"elementId": "container1",
"isVisible": false
}
]
}
]
}
],
"id": "container1",
"isVisible": false
},
{
"type": "Container",
"items": [
{
"type": "ImageSet",
"images": [
{
"type": "Image",
"url": "${value[0].contentUrl}",
"altText": "${value[0].name}",
"size": "Medium",
"id": "img2"
}
]
},
{
"type": "TextBlock",
"text": "Another some text",
"wrap": true
},
{
"type": "ActionSet",
"actions": [
{
"type": "Action.ToggleVisibility",
"title": "Previous image",
"targetElements": [
{
"elementId": "container2",
"isVisible": false
},
{
"elementId": "container1",
"isVisible": true
}
]
}
]
}
],
"id": "container2"
}
]
}
Please accept as a solution if was helpful.