# Adaptive Card sample: MS Course Video

- id: `ms-course-video`
- Adaptive Card schema version: 1.5

Microsoft sample — course video card with hero image (selectAction), Show more/less via Action.ToggleVisibility, and targetWidth responsive columns.

## Elements

- `Image` — style: RoundedCorners, selectAction: Action.OpenUrl
- `ColumnSet` — logo + author — targetWidth: AtLeast:Standard pour colonnes responsives
- `RichTextBlock + TextRun` — selectAction: Action.ToggleVisibility — Show more / Show less
- `Action.ToggleVisibility` — targetElements: truncatedText / fullText / showMore / showLess
- `ActionSet` — Action.OpenUrl

## Card JSON

```json
{
  "type": "AdaptiveCard",
  "speak": "Intro to graphic design, concepts video",
  "$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
  "version": "1.5",
  "body": [
    {
      "type": "Image",
      "url": "https://raw.githubusercontent.com/OfficeDev/Microsoft-Teams-Card-Samples/main/samples/course-video/assets/video_image.png",
      "selectAction": {
        "type": "Action.OpenUrl",
        "url": "https://adaptivecards.io/",
        "altText": "Intro to Graphic Design: Concepts Video"
      },
      "style": "RoundedCorners"
    },
    {
      "type": "TextBlock",
      "text": "Intro to Graphic Design: Concepts",
      "wrap": true,
      "size": "Large",
      "weight": "Bolder"
    },
    {
      "type": "TextBlock",
      "text": "Course · 52m · Beginner",
      "wrap": true,
      "isSubtle": true,
      "spacing": "Small"
    },
    {
      "type": "ColumnSet",
      "spacing": "None",
      "columns": [
        {
          "type": "Column",
          "width": "auto",
          "horizontalAlignment": "Center",
          "verticalContentAlignment": "Center",
          "items": [
            {
              "type": "Image",
              "url": "https://raw.githubusercontent.com/OfficeDev/Microsoft-Teams-Card-Samples/main/samples/course-video/assets/logo_image.png",
              "width": "16px",
              "height": "16px",
              "altText": "Logo"
            }
          ]
        },
        {
          "type": "Column",
          "width": "auto",
          "spacing": "Small",
          "verticalContentAlignment": "Center",
          "items": [
            {
              "type": "TextBlock",
              "text": "Sketchpad Scholars",
              "wrap": true,
              "weight": "Bolder"
            }
          ]
        },
        {
          "type": "Column",
          "width": "auto",
          "spacing": "Small",
          "verticalContentAlignment": "Center",
          "targetWidth": "AtLeast:Standard",
          "items": [
            {
              "type": "TextBlock",
              "text": "·"
            }
          ]
        },
        {
          "type": "Column",
          "width": "auto",
          "spacing": "Small",
          "verticalContentAlignment": "Center",
          "targetWidth": "AtLeast:Standard",
          "items": [
            {
              "type": "TextBlock",
              "text": "Tony Harper",
              "wrap": true
            }
          ]
        }
      ]
    },
    {
      "type": "TextBlock",
      "targetWidth": "AtLeast:Narrow",
      "text": "This course is designed to equip you with an understanding of the key principles and tools necessary for creating compelling designs. You'll gain practical experience with creative software and learn...",
      "wrap": true,
      "id": "truncatedText"
    },
    {
      "type": "TextBlock",
      "targetWidth": "AtLeast:Narrow",
      "text": "This course is designed to equip you with an understanding of the key principles and tools necessary for creating compelling designs. You'll gain practical experience with creative software and learn about design principles through hands-on projects that will help build your portfolio. Enroll now and start your journey to mastering the art of graphic design.",
      "wrap": true,
      "isVisible": false,
      "id": "fullText"
    },
    {
      "type": "RichTextBlock",
      "id": "showMore",
      "targetWidth": "AtLeast:Narrow",
      "spacing": "None",
      "inlines": [
        {
          "type": "TextRun",
          "text": "Show more",
          "selectAction": {
            "type": "Action.ToggleVisibility",
            "targetElements": [
              "truncatedText",
              "fullText",
              "showMore",
              "showLess"
            ]
          }
        }
      ]
    },
    {
      "type": "RichTextBlock",
      "id": "showLess",
      "targetWidth": "AtLeast:Narrow",
      "spacing": "None",
      "isVisible": false,
      "inlines": [
        {
          "type": "TextRun",
          "text": "Show less",
          "selectAction": {
            "type": "Action.ToggleVisibility",
            "targetElements": [
              "truncatedText",
              "fullText",
              "showMore",
              "showLess"
            ]
          }
        }
      ]
    },
    {
      "type": "ActionSet",
      "spacing": "Large",
      "actions": [
        {
          "type": "Action.OpenUrl",
          "title": "Open",
          "url": "https://adaptivecards.io/"
        }
      ]
    }
  ]
}
```
