Skip to main content
Adaptive Cards
Adaptive Cards
- Adaptive cards are snippets of UI created in JSON.
- The JSON is transformed into native UI.
- It helps design and integrate light-weight UI for all major platforms and frameworks.
Goals of Adaptive Card
- Portable to any app, device or UI framework
- Open: Libraries and schema are open source and shared
- Low cost: Easy to define, easy to consume
- Expressive
- Purely declarative: No code is needed
- Automatically styled
Card Layouts
- Hero: Ideal for sharing articles where an image tells most of the story.
- Thumbnail: for quick interactions
- List: to pick an item from a list
- Digest: for news digests or round-up posts
- Video/Media: Combines text and media
- Form: to collect quick inputs from users to create tasks
- Quick Input: to collect quick inputs from users
- Expandable: allows users to select buttons and gather additional input from the same card.
Collapisble Sections
- Action.ShowCard and Action.ToggleVisibility to show information dynamically.
Container Layouts
- Layout.Stack: stacks elements on top of each other. Used by default.
- Layout.Flow: spreads elements horizontally and wraps them across multiple rows as needed.
- Layout.AreaGrid: divides a container into named areas into which elements can be placed.
Elements:
- ActionSet: Displays a set of action, which can be placed anywhere in the card.
- Table
- Progressar
- ImageSet
- Image
- Icon
- FactSet
- Container: to logically group a set of elements together, A container for other elements.
- TextBlock:
Actions
- Action.Execute
- Action.InsertImage
- Action.OpenUrl
- Action.OpenUrlDialog
- Action.Popover
- Action.ResetInputs
- Action.ShowCard
- Action.Submit
- Action.ToggleVisibilty
- Input.ChoiceSet
- Input.Date
- Input.Number
- Input.Rating
- Input.Text
- Input.Time
- Input.Toggle