Search code examples
botframeworkmicrosoft-teamsadaptive-cards

I need to add style to action button in adaptive card


I am using Adaptive Card 1.2 to be displayed on MS Teams. I want to style the action button but not able to do do.

subCard.Actions = new List<AdaptiveAction>() {
    new AdaptiveSubmitAction {
        Title = "Ok",
        DataJson = "{ \"Type\": \"response_feedback\" }",
        Style="positive",
    }
};

Solution

  • From my testing, it seems like Style is not implemented in Teams, at least not at the moment. By the way, you can use App Studio to test this - there's a tab there called "card editor" where you can create card JSON, see a preview, and even send it to yourself.