Blazor Blueprint

July 2, 2026 · View on GitHub

Website NuGet License

Beautiful UI components for Blazor, built with accessibility in mind. Inspired by shadcn/ui.

Blazor Blueprint - Beautiful Components for Blazor

Documentation · Components · Primitives

100+ Components · 11 Chart Types · 3,200+ Icons

Table of Contents

Why Blazor Blueprint?

Blazor developers lack a modern, design-system-first UI library equivalent to what React developers have with shadcn/ui. Blazor Blueprint fills that gap — pre-built components and headless primitives that integrate directly with Tailwind and shadcn themes, targeting .NET 8 across Server, WebAssembly, and Auto render modes.

  • Zero Configuration — Pre-built CSS included. No Tailwind setup, no Node.js, no build tools required.
  • Full shadcn/ui Theme Compatibility — Use themes from shadcn/ui or tweakcn directly.
  • Built with Accessibility in Mind — Includes ARIA attributes, keyboard support, and semantic HTML structure.
  • Dark Mode Built-in — Light and dark themes with CSS variables, ready out of the box.
  • Two-Layer Architecture — Use pre-styled components for speed, or headless primitives for full control.

AI Integration

Blazor Blueprint ships with a built-in MCP server and llms.txt — so Claude, Cursor, Copilot, and Windsurf generate correct component code on the first try.

  • MCP Server — 11 tools give your AI structured access to every component, pattern, and API.
  • llms.txt — 100+ machine-optimized docs so any LLM can understand the library without hallucinating.
  • Works Everywhere — Claude Code, Cursor, GitHub Copilot, Windsurf — any MCP-compatible AI tool.
npx blazorblueprint add mcp-server

Learn more at blazorblueprintui.com.

Getting Started

Installation

# Styled components (includes Primitives)
dotnet add package BlazorBlueprint.Components

# Or just headless primitives for custom styling
dotnet add package BlazorBlueprint.Primitives

Optionally add an icon library:

dotnet add package BlazorBlueprint.Icons.Lucide       # 1,640+ icons
dotnet add package BlazorBlueprint.Icons.Heroicons    # 1,288 icons (4 variants)
dotnet add package BlazorBlueprint.Icons.Feather      # 286 icons
dotnet add package BlazorBlueprint.Icons.FontAwesome  # 2,066 icons (3 variants, includes brand logos)

Project Template

The fastest way to start a new project:

dotnet new install BlazorBlueprint.Templates
dotnet new blazorblueprint -n MyApp

Setup

1. Register services in Program.cs:

builder.Services.AddBlazorBlueprintComponents();

2. Add imports to _Imports.razor:

@using BlazorBlueprint.Components
@using BlazorBlueprint.Primitives.Services

3. Add CSS to your App.razor <head>:

<!-- Your theme variables (optional) -->
<link rel="stylesheet" href="styles/theme.css" />
<!-- Blazor Blueprint styles -->
<link rel="stylesheet" href="_content/BlazorBlueprint.Components/blazorblueprint.css" />

4. Add BbPortalHost to your root layout (required for overlays like Dialog, Sheet, Popover):

@inherits LayoutComponentBase

<div class="min-h-screen bg-background">
    @Body
</div>

<BbPortalHost />

5. Use components:

<BbButton Variant="ButtonVariant.Default">Click me</BbButton>

<BbDialog>
    <BbDialogTrigger>
        <BbButton>Open Dialog</BbButton>
    </BbDialogTrigger>
    <BbDialogContent>
        <BbDialogHeader>
            <BbDialogTitle>Welcome</BbDialogTitle>
            <BbDialogDescription>
                Beautiful Blazor components inspired by shadcn/ui.
            </BbDialogDescription>
        </BbDialogHeader>
        <BbDialogFooter>
            <BbDialogClose>
                <BbButton Variant="ButtonVariant.Outline">Close</BbButton>
            </BbDialogClose>
        </BbDialogFooter>
    </BbDialogContent>
</BbDialog>

6. Render modes — Blazor Blueprint components handle user input and JavaScript interop, so they require an interactive render mode (InteractiveServer, InteractiveWebAssembly, or InteractiveAuto). The simplest setup is to enable interactivity globally on the router:

<!-- App.razor -->
<HeadOutlet @rendermode="InteractiveServer" />
<Routes @rendermode="InteractiveServer" />

Important: A routed page's layout inherits the page's render mode. If you use per-page interactivity (e.g. because some auth pages must stay static for HttpContext), MainLayout renders statically — so buttons, theme toggles, and providers placed in it won't respond. In that case, render the interactive layout chrome (and BbPortalHost / BbToastProvider / BbDialogProvider) as interactive islands with @rendermode. See the Render Modes guide for the full pattern.

Components

Blazor Blueprint includes 112 styled components organized into the following categories.

Enterprise Components

Production-ready components for complex data-driven applications:

ComponentDescription
Dashboard GridDrag-and-drop, resizable widget layout for composing dashboards. Built on CSS Grid with responsive breakpoints, state persistence, keyboard accessibility, and loading/empty states.
DataGridFull-featured data grid with multi-column sorting, per-column filtering, row grouping with aggregates, hierarchical tree data, row selection, expandable rows, virtualization, context menus, pinned columns, column reordering/resizing/visibility, and state persistence. Supports IQueryable, IEnumerable, and ItemsProvider data sources.
Dynamic FormSchema-driven form rendering — define fields, validation rules, and layout in a schema object, and the component generates the complete form with appropriate inputs, conditional visibility, and error display.
Filter BuilderVisual query builder for constructing complex filter expressions with AND/OR logic, nested condition groups, and type-aware operators. Pairs with DataGrid for interactive data exploration.
Form WizardMulti-step form wizard with progress indicators, per-step validation, optional/skippable steps, and navigation controls.
Chart11 chart types (Area, Bar, Candlestick, Funnel, Gauge, Heatmap, Line, Pie, Radar, Radial Bar, Scatter) built on Apache ECharts with a declarative composition API and automatic theme integration.
DockIDE-style docking layout — drag-and-drop panels between regions, pinning, maximize, close/reopen, pop-out floating panels, and tab-strip overflow.
Event CalendarAgenda/event calendar with Month, Week, and Agenda views, generic over your own event model, with per-event templates and styling.
Rich Text EditorWYSIWYG editor with formatting toolbar and HTML output.
Markdown EditorToolbar formatting with split-pane live preview.

Form & Input

ComponentDescription
ButtonMultiple variants (default, destructive, outline, secondary, ghost, link) with loading state and icon support
Button GroupVisually group related buttons with connected styling
CalendarInteractive calendar with date constraints, range selection, and per-day templates/styling
CheckboxCheckbox with indeterminate state and ARIA attributes
Checkbox GroupGroup of checkboxes with select-all support
Color PickerColor selection with swatches and custom input
ComboboxSearchable autocomplete dropdown
Currency InputCurrency-formatted numeric input with locale support
Date PickerDate picker with popover calendar, optional manual text entry with configurable input formats, and formatting options
Date Range PickerDual-calendar range selection with quick-select presets and optional auto-apply
Date Time PickerCombined date and time selection in one popover — calendar plus 12/24h time panel with optional seconds
Dynamic FormSchema-driven form rendering — generates complete forms from a definition with automatic input selection, validation, conditional visibility, and layout customization
FieldCombines label, control, description, and error for structured forms
Filter BuilderVisual query builder for data filter expressions with AND/OR logic, condition groups, and two-way binding
File UploadDrag-and-drop file upload with preview
Form Field CheckboxPre-configured checkbox field with built-in label, description, and validation
Form Field Checkbox GroupPre-configured checkbox group field with built-in label, description, and manual validation
Form Field ComboboxPre-configured combobox field with built-in label, description, and validation
Form Field Currency InputPre-configured currency input field with built-in label, description, and validation
Form Field Date PickerPre-configured date picker field with built-in label, description, and validation
Form Field Date Range PickerPre-configured date range picker field with built-in label, description, and manual validation
Form Field Date Time PickerPre-configured date-time picker field with built-in label, description, and validation
Form Field File UploadPre-configured file upload field with built-in label, description, and manual validation
Form Field InputPre-configured input field with built-in label, description, and validation
Form Field Input OTPPre-configured OTP input field with built-in label, description, and validation
Form Field Masked InputPre-configured masked input field with built-in label, description, and validation
Form Field MultiSelectPre-configured multi-select field with built-in label, description, and validation
Form Field Native SelectPre-configured native select field with built-in label, description, and validation
Form Field Numeric InputPre-configured numeric input field with built-in label, description, and validation
Form Field RadioGroupPre-configured radio group field with built-in label, description, and validation
Form Field SelectPre-configured select field with built-in label, description, and validation
Form Field SwitchPre-configured switch field with built-in label, description, and validation
Form Field Tag InputPre-configured tag input field with built-in label, description, and validation
Form Field TextareaPre-configured textarea field with built-in label, description, and validation
Form Field Time PickerPre-configured time picker field with built-in label, description, and validation
Form WizardMulti-step form wizard with step navigation, progress indication, per-step validation, and optional/skippable steps
InputText input with multiple types and validation
Input FieldTyped input with automatic conversion, formatting, and validation for 15+ types
Input GroupEnhanced inputs with icons, buttons, and addons
Input OTPOne-time password input with individual digit fields
LabelForm labels with control association
Masked InputInput with format masks (phone, SSN, etc.)
MultiSelectSearchable multi-selection with tags and checkboxes
Native SelectBrowser-native select with consistent styling
Numeric InputNumeric input with increment/decrement controls
Radio GroupRadio buttons with keyboard navigation
Range SliderDual-handle slider for selecting value ranges
RatingStar/icon rating input
SelectDropdown select with search and keyboard navigation
SliderRange input with drag support
SortableDrag-and-drop sortable lists and grids powered by SortableJS, with connected multi-list support and Kanban-style boards
Split ButtonPrimary action with dropdown for secondary actions
SwitchToggle switch with customizable thumb
Tag InputInline tag/chip input for managing string lists with suggestions, validation, and customizable triggers
TextareaMulti-line text input with auto-sizing and character count
Time PickerTime selection with hour/minute controls
ToggleTwo-state toggle button
Toggle GroupSingle or multi-select toggle group

Layout & Navigation

ComponentDescription
AccordionCollapsible content sections (single or multiple)
Aspect RatioMaintain width/height ratio for responsive content
BreadcrumbNavigation trail with hierarchical location
CardContainer with header, content, footer, and action areas
CarouselSlideshow for cycling through content
CollapsibleExpandable/collapsible panels
DockIDE-style docking layout with drag-and-drop panels, pinning, maximize, pop-out floating windows, and tab overflow
ItemFlexible list items with media, content, and actions
Navigation MenuHorizontal navigation with dropdown menus
PaginationPage navigation with first/previous/next/last controls and page size selection
ResizableResizable panels with drag handles
Responsive NavAdaptive navigation that switches between desktop and mobile layouts
Scroll AreaCustom scrollable area with styled scrollbars
SeparatorVisual dividers (horizontal and vertical)
SidebarResponsive sidebar with collapsible icon mode, variants (default, floating, inset), and mobile sheet integration
TabsTabbed interfaces with controlled/uncontrolled modes
TimelineVertical timeline with alignment, connector styles, loading states, and collapsible items

Overlay

ComponentDescription
Alert DialogModal requiring user acknowledgement
CommandCommand palette with keyboard navigation, filtering, and dialog mode
Context MenuRight-click menu with customizable items
DialogModal dialogs with programmatic DialogService supporting alert, prompt, and custom component dialogs
DrawerMobile-friendly panel sliding from screen edge
Dropdown MenuMenus with checkbox items and keyboard navigation
Hover CardRich hover previews
MenubarDesktop application-style menu bar
PopoverFloating content containers
SheetSlide-out panels (top, right, bottom, left)
ToastNotification messages with multiple positions via ToastService
TooltipContextual hover tooltips

Data & Content

ComponentDescription
Chart11 chart types (Area, Bar, Candlestick, Funnel, Gauge, Heatmap, Line, Pie, Radar, Radial Bar, Scatter) with theme integration
Dashboard GridDrag-and-drop, resizable widget layout for dashboards with responsive breakpoints, state persistence, and keyboard accessibility
DataGridEnterprise data grid with sorting, per-column filtering, row grouping with aggregates, hierarchical tree data, selection, expandable rows, row virtualization, context menu, pinned columns, column reordering/resizing/visibility, and state persistence
DataTableTables with sorting, filtering, pagination, and row selection
DataViewDisplays data using templates in a grid or list layout with sorting, filtering, pagination, and infinite scrolling
Event CalendarMonth, Week, and Agenda views over your own event model with per-event templates, styling, and click callbacks
Markdown EditorToolbar formatting with live preview
Rich Text EditorWYSIWYG editor with formatting toolbar and HTML output
Tree ViewHierarchical data display with selection, checkboxes, lazy loading, drag-and-drop, search filtering, and data-driven or declarative modes

Display

ComponentDescription
AlertCallout messages with dismissible variants
AvatarUser avatars with fallback and group support
BadgeStatus badges and labels
Copy TextClick-to-copy text with tooltip feedback and copied-state indicator
Dark Mode ToggleButton that toggles light/dark mode with customizable icons and optional label
EmptyEmpty state placeholder with icon, title, and description
KbdKeyboard shortcut display
ProgressProgress bar indicator
SkeletonLoading placeholders
SpinnerLoading spinner with size variants
Theme SwitcherTheme customization popover — light/dark mode, independent base and primary colors, and radius, with persistence
TypographyConsistent text styling (H1–H4, paragraph, lead, muted, blockquote, inline code, etc.)

Chat & AI

Building blocks for chat and AI-agent interfaces:

ComponentDescription
AttachmentFile attachment chips with upload states (uploading, processing, error, done), previews, and actions
BubbleMessage bubbles with tinted/outlined variants, reactions, and attachment slots
MarkerInline status and tool-call markers (e.g. "searching the web…") with an animated shimmer effect
MessageChat message rows with avatar, content, and footer, aligned per role

Primitives

Blazor Blueprint's 26 headless primitives provide behavior, ARIA attributes, and keyboard support without any styling. They handle all the complex interaction logic — focus trapping, ARIA attributes, keyboard shortcuts, portal rendering — while giving you complete control over appearance.

Use primitives when you need full design freedom or are building a custom design system.

PrimitiveWhat it handles
AccordionExpand/collapse logic, single/multiple mode, keyboard navigation
Alert DialogModal requiring explicit acknowledgement, no dismiss via overlay or Escape
CheckboxChecked/unchecked/indeterminate state, ARIA attributes
CollapsibleOpen/close state, animated transitions
Context MenuRight-click menu with keyboard navigation and positioning
Dashboard GridWidget layout state, drag-and-drop coordination, resize handling, responsive breakpoints
DataGridHeadless data grid with sorting, filtering, pagination, selection, expansion, row grouping, and state management
DialogFocus trapping, escape to close, scroll locking, portal rendering
Dropdown MenuOpen/close, keyboard navigation, click-outside dismissal
Hover CardHover intent, delay timing, portal positioning
LabelLabel-control association
PopoverFloating positioning, portal rendering, click-outside
ProgressAccessible progress bar with determinate and indeterminate states
Radio GroupSingle selection, arrow key navigation, ARIA roles
Scroll AreaCustom scrollbar with accessible ARIA scrollbar role and drag support
SelectDropdown behavior, typeahead, keyboard navigation
SeparatorSemantic or decorative divider with orientation support
SheetSide panel, focus trapping, scroll locking
SliderRange input with keyboard navigation and pointer drag support
SortableDrag-and-drop sortable lists with SortableJS interop, ARIA live announcements, and connected multi-list support
SwitchToggle state, keyboard support, ARIA switch role
TableSorting, pagination, row selection, keyboard row navigation
TabsTab selection, arrow key navigation, ARIA tab roles
TogglePressed/active state with aria-pressed support
TooltipHover/focus triggers, delay, portal positioning
Tree ViewHierarchical expand/collapse, selection, checkbox state management

Primitives are completely unstyled — bring your own CSS, Tailwind classes, or inline styles:

<BbAccordion class="my-accordion">
    <BbAccordionItem Value="item-1">
        <BbAccordionTrigger class="my-trigger">Section One</BbAccordionTrigger>
        <BbAccordionContent class="my-content">Content here.</BbAccordionContent>
    </BbAccordionItem>
</BbAccordion>

Icons

Four icon library packages with 5,200+ total icons:

PackageIconsStyleLicense
BlazorBlueprint.Icons.Lucide1,640+Stroke-based, consistent 24x24ISC
BlazorBlueprint.Icons.Heroicons1,2884 variants (Outline, Solid, Mini, Micro)MIT
BlazorBlueprint.Icons.Feather286Minimalist, stroke-based 24x24MIT
BlazorBlueprint.Icons.FontAwesome2,0663 variants (Solid, Regular, Brands — includes brand logos)CC BY 4.0 / SIL OFL 1.1 / MIT (Free tier)

Theming

Blazor Blueprint is 100% compatible with shadcn/ui themes. Use any theme from shadcn/ui or tweakcn — copy the CSS variables into your theme.css:

@layer base {
  :root {
    --background: oklch(1 0 0);
    --foreground: oklch(0.1450 0 0);
    --primary: oklch(0.2050 0 0);
    --primary-foreground: oklch(0.9850 0 0);
    /* ... */
  }

  .dark {
    --background: oklch(0.1450 0 0);
    --foreground: oklch(0.9850 0 0);
    --primary: oklch(0.9220 0 0);
    --primary-foreground: oklch(0.2050 0 0);
    /* ... */
  }
}

Load your theme before blazorblueprint.css so the variables are defined when referenced.

Supported Variables

  • Colors--background, --foreground, --primary, --secondary, --accent, --destructive, --muted, and their foreground variants
  • Typography--font-sans, --font-serif, --font-mono
  • Layout--radius, --shadow-*
  • Charts--chart-1 through --chart-5
  • Sidebar--sidebar, --sidebar-primary, --sidebar-accent, and variants

Dark Mode

Apply the .dark class to your <html> element. All components automatically switch to dark mode colors.

Localization

All component chrome strings (button labels, placeholders, ARIA labels, status messages) are localizable via the IBbLocalizer interface. The built-in DefaultBbLocalizer provides English defaults for all 260+ strings.

Quick Start

Subclass DefaultBbLocalizer to integrate with your localization strategy:

public class AppLocalizer : DefaultBbLocalizer
{
    private readonly IStringLocalizer<SharedResources> localizer;

    public AppLocalizer(IStringLocalizer<SharedResources> localizer)
    {
        this.localizer = localizer;
    }

    public override string this[string key] => localizer[key] ?? base[key];
}

// Register in Program.cs
builder.Services.AddSingleton<IBbLocalizer, AppLocalizer>();

Components use string-key lookup (e.g., Localizer["DataGrid.Loading"]) with string.Format for parameterized strings. Calendar, DatePicker, DateRangePicker, and NumericInput automatically adapt to CultureInfo.CurrentCulture for date/number formatting.

Architecture

Blazor Blueprint uses a two-layer architecture inspired by Radix UI:

BlazorBlueprint.Components     ← Pre-styled, ready to use
    ↓ builds on
BlazorBlueprint.Primitives     ← Headless, includes ARIA attributes and keyboard support

Components ship pre-built CSS matching the shadcn/ui design system. No Tailwind setup required — just reference the stylesheet and optionally provide theme variables.

Primitives are completely unstyled. They include ARIA attributes, focus management, and keyboard support for complex interaction patterns, giving you full control over appearance.

Services

Services are registered via dependency injection:

  • AddBlazorBlueprintComponents() — registers everything (Components + Primitives)
  • AddBlazorBlueprintPrimitives() — registers only Primitives services

Key services include IPortalService (overlay rendering), IFocusManager (focus trapping), IPositioningService (floating element positioning), IKeyboardShortcutService (global shortcuts), DialogService (programmatic dialogs), ToastService (notifications), and IBbLocalizer (localization).

Demo Applications

Demo applications are included for all three Blazor hosting models:

dotnet run --project demos/BlazorBlueprint.Demo.Server
dotnet run --project demos/BlazorBlueprint.Demo.Wasm
dotnet run --project demos/BlazorBlueprint.Demo.Auto

The demos share a common Razor Class Library (BlazorBlueprint.Demo.Shared) with thin hosting projects per render mode, demonstrating that components work identically across Server, WebAssembly, and Auto.

Contributing

See CONTRIBUTING.md for development setup and guidelines.

License

Blazor Blueprint is open source software licensed under the Apache License 2.0.

If you create derivative works, you must include the contents of the NOTICE file in your distribution.

Acknowledgments

Blazor Blueprint is inspired by shadcn/ui and the design principles of Radix UI. Blazor Blueprint is a complete reimplementation for Blazor/C# and contains no code from these projects.