Documentation
Getting started
Install the library, import the namespace, add the shared styles and scripts, and make sure updates reach your users without cache hiccups. Everything past step 3 is optional.
1. Install
bit BlazorUI ships as a NuGet package. Any of these three routes installs it.
Command line - run this in your project directory:
dotnet add package Bit.BlazorUIPackage Manager Console - in Visual Studio:
Install-Package Bit.BlazorUIVisual Studio - or use the NuGet Package Manager UI and search for Bit.BlazorUI.
Extra components - the larger components (BitChart, BitDataGrid, BitMap, BitPdfViewer, the editors) live in Bit.BlazorUI.Extras. Every component page says which package it comes from.
dotnet add package Bit.BlazorUI.ExtrasAssets - the Segoe UI and Roboto web fonts behind the Fluent and Material type ramps, for clients that do not have them installed: Bit.BlazorUI.Assets.
dotnet add package Bit.BlazorUI.AssetsIcon pack - the Fabric (MDL2) icons the BitIconName class names:
Bit.BlazorUI.Icons.
dotnet add package Bit.BlazorUI.Icons2. Namespace
One using, once, so no page has to repeat it.
Add this line to your app's _Imports.razor:
@using Bit.BlazorUI3. Styles and scripts
The one stylesheet and the one script the whole library shares.
Open App.razor (or index.html in a standalone WASM app)
and add the stylesheet:
<link href="_content/Bit.BlazorUI/styles/bit.blazorui.css" rel="stylesheet" />Then the script:
<script src="_content/Bit.BlazorUI/scripts/bit.blazorui.js"></script>Extra components - if you installed Bit.BlazorUI.Extras:
<link href="_content/Bit.BlazorUI.Extras/styles/bit.blazorui.extras.css" rel="stylesheet" />
<script src="_content/Bit.BlazorUI.Extras/scripts/bit.blazorui.extras.js"></script>Assets - if you installed Bit.BlazorUI.Assets:
<link href="_content/Bit.BlazorUI.Assets/styles/bit.blazorui.assets.css" rel="stylesheet" />Icon pack - if you installed Bit.BlazorUI.Icons:
<link href="_content/Bit.BlazorUI.Icons/styles/bit.blazorui.icons.css" rel="stylesheet" />4. Cache busting
Without this, the browsers of people already using your app will keep serving them the previous version of the library's css and js.
On .NET 9 or later, the built-in @Assets[""] feature fingerprints the
resource files for you.
bit BlazorUI also publishes its own version, which you can append as a query string:
<script src="_content/Bit.BlazorUI/scripts/[email protected]"></script>Note: that expression only works in App.razor. For other root
files - index.html in a standalone WASM project, for instance - the
version has to be added another way.
Bit.BlazorUI.Assets
ships two drop-in components for App.razor that hash the file's actual
content, so the URL changes exactly when the file does.
Script - a replacement for <script>:
<Script Src="_content/Bit.BlazorUI/scripts/bit.blazorui.js"></Script>renders as:
<script src="_content/Bit.BlazorUI/scripts/bit.blazorui.js?v=sha256-Z5yBv0K89OBRVurhAVzatpp3aGXsNn00e3GzQiTq_Z4"></script>Link - a replacement for <link>:
<Link Href="_content/Bit.BlazorUI/styles/bit.blazorui.css" rel="stylesheet" />renders as:
<link href="_content/Bit.BlazorUI/styles/bit.blazorui.css?v=sha256-VI6BIGZLTtmyhn3V-4RH-Yyi0Ud3p0g5dHvByeaoZ9Y" rel="stylesheet" />This very site uses both - see its App.razor .
5. Legacy components
Only if you are upgrading a project that used the previous implementations of Chart, DataGrid, the editors or the PDF reader.
Some of the older components were re-implemented with new APIs - the native SVG
BitChart, the new BitDataGrid,
BitMarkdownViewer, BitMarkdownEditor,
BitRichTextEditor and BitPdfViewer. Their previous
versions are preserved unchanged in
Bit.BlazorUI.Legacy,
under their own namespace, so the two generations can live side by side without conflict.
The package ships:
- BitChartLegacy - the original Chart.js based charting component.
- BitDataGridLegacy - the original data grid (previously renamed to
BitQuickGrid). - BitMarkdownViewerLegacy - the original marked.js based markdown viewer.
- BitMarkdownEditorLegacy - the original markdown editor.
- BitRichTextEditorLegacy - the original Quill based rich text editor.
- BitPdfReaderLegacy - the original pdf.js based PDF reader.
1. Install the package:
dotnet add package Bit.BlazorUI.Legacy2. Import the namespace in _Imports.razor:
@using Bit.BlazorUI.Legacy3. Register its services (this also registers the core bit BlazorUI services):
services.AddBitBlazorUILegacyServices();4. Add its stylesheet and script:
<link href="_content/Bit.BlazorUI.Legacy/styles/bit.blazorui.legacy.css" rel="stylesheet" />
<script src="_content/Bit.BlazorUI.Legacy/scripts/bit.blazorui.legacy.js"></script>6. AI and MCP integration
Point your coding agent at the library's MCP server and it discovers components, pulls accurate examples, and follows the library's conventions on its own.
The endpoint is https://blazorui.bitplatform.dev/mcp, and it works with GitHub Copilot, Cursor, Claude, Windsurf and anything else that speaks MCP.
Register the server
.vscode/mcp.json
{
"servers": {
"bitBlazorUI": {
"type": "http",
"url": "https://blazorui.bitplatform.dev/mcp"
}
}
}mcp.json
{
"mcpServers": {
"bitBlazorUI": {
"type": "http",
"url": "https://blazorui.bitplatform.dev/mcp",
"tools": [
"*"
]
}
}
}Tell the agent to use it
Add these rules to your agents.md, copilot-instructions.md, .cursor/rules, or whatever your agent reads:
### bit BlazorUI
- For all UI-related tasks in this Blazor project, you **MUST** use the bit BlazorUI MCP server.
- Always start component discovery with the `GetBitBlazorUIComponentsList` tool.
- For detailed API, parameters, and usage examples, call `GetBitBlazorUIComponentExamples`.
- Prefer `Bit*` components over plain HTML/CSS or other UI libraries.
Tip: many agents - Cursor and Claude in particular - pick up the server automatically once those instructions are in place.
Feedback
Found a mistake, a gap, or something that could be clearer? Every page and every component is one click from its source.