Adaptive Cards for Blazor is a community project that provides Adaptive Cards support for your Blazor applications.
Adaptive Cards are a way to exchange content in a common and consistent way. Adaptive Cards can be integrated into different applications like Microsoft Teams and Outlook. Adaptive Cards can also be integrated into custom applications built with .NET, iOS and JavaScript. And now Blazor, the new Web App platform from Microsoft is supported.
Adaptive Cards for Blazor provides components for displaying Adaptive Cards inside your Blazor Application. Here's few of the most notable features of this library:
Adaptive Cards for Blazor's home site is located at https://adaptivecardsblazor.com/.
Project's source code is available from GitHub. GitHub can be used to report any suggestions or issues.
Adaptive Cards for Blazor targets .NET Core 3.1. Please also note that the library has been tested with the server side version of Blazor.
Getting Started guide is available through the project's home site.
Install-Package AdaptiveCardsBlazor
public void ConfigureServices(IServiceCollection services)
{
services.AddRazorPages();
services.AddServerSideBlazor();
...
services.AddBlazorAdaptiveCards();
}
...
@using AdaptiveCards.Blazor
<script src="https://github.com/mikoskinen/Blazor.AdaptiveCards/raw/master/_content/AdaptiveCardsBlazor/adaptiveCardsJsInterop.js"></script>
@code {
string schema = @"{
""$schema"": ""http://adaptivecards.io/schemas/adaptive-card.json"",
""type"": ""AdaptiveCard"",
""version"": ""1.2"",
""body"": [
{
""type"": ""TextBlock"",
""text"": ""Adaptive Cards for Blazor simple example""
}
]
}";
}
<AdaptiveCard Schema="@schema"></AdaptiveCard>
@page "/"
<AdaptiveCard Schema="@schema"></AdaptiveCard>
@code{
string schema = @"{
""$schema"": ""http://adaptivecards.io/schemas/adaptive-card.json"",
""type"": ""AdaptiveCard"",
""version"": ""1.2"",
""body"": [
{
""type"": ""TextBlock"",
""text"": ""Adaptive Cards for Blazor simple example""
}
]
}";
}
Adaptive Cards for Blazor is created by Mikael Koskinen.
Contributions are welcome!
Adaptive Cards for Blazor is MIT licensed. The library uses the following other libraries: