A set of Blazor components wrapping Microsoft’s official Fluent UI Web Components. They implement the latest state of the Fluent design language, are built on FAST and work in every major browser.
$ dotnet add package Microsoft.Fast.Components.FluentUI:star: We appreciate your star, it helps!
The Microsoft.Fast.Components.FluentUI package provides a lightweight set of Blazor component wrappers around Microsoft's official FluentUI Web Components. The FluentUI Web Components are built on FAST and work in every major browser. To get up and running with Microsoft.Fast.Components.FluentUI see the Getting Started section below.
The source for @fluentui/web-components is hosted in the Fluent UI mono-repository. Documentation on the components is available on docs.microsoft.com.
To get started using Microsoft.Fast.Components.FluentUI, you will need both the Nuget package and the accompanying Web Component implementations. First, install the Nuget package. If using the .NET CLI, you can run the following command to accomplish that.
dotnet add package Microsoft.Fast.Components.FluentUI
Next, add a script tag to your project.
<script type="module" src="https://unpkg.com/@fluentui/web-components"></script>
Depending on what type of Blazor project you are building, it will go into one of two places:
_Host.cshtml file.Note: If the script reference is added to a
.razoror.cshtmlfile, you will need to escape the@with a second@like sohttps://unpkg.com/@@fluentui/web-components.
Once these steps are completed, you can then begin using the components throughout your Blazor application by adding the following using statement to your views:
@using Microsoft.Fast.Components.FluentUI
Here's an example of what page with a card and button would look like:
@page "/"
@using Microsoft.Fast.Components.FluentUI
<FluentCard>
<h2>Hello World!</h2>
<FluentButton Appearance="@Appearance.Accent">
Click Me
</FluentButton>
</FluentCard>
Take a look in the examples folder of this repository to see how to use the various components.
Looking to get answers to questions or engage with us in realtime? Our community is most active on Discord. Submit requests and issues on GitHub, or join us by contributing on some good first issues via GitHub.
If you don't find a component you're looking for, it's best to create the issue in our FAST repo here and limit issues on this repo to bugs in the Blazor component wrappers or Blazor-specific features.
We look forward to building an amazing open source community with you!