$ show blazorblueprintui/ui
BlazorBlueprint is a comprehensive Blazor UI component library inspired by shadcn/ui, providing over 112 styled components and 28 headless primitives. It targets .NET 8 across Server, WebAssembly, and Auto render modes, with full accessibility (ARIA, keyboard navigation), theming via CSS custom properties (compatible with shadcn CSS variables), and zero Tailwind/Node setup. The library is split into two layers: Primitives (headless, behavioral components with focus management, positioning, and portal services) and Components (styled, ready-to-use widgets like DataGrid, charts, forms, dialogs, and navigation). It ships with four icon libraries (5,200+ icons) and 11 chart types via Apache ECharts. The architecture emphasizes composability through cascading contexts, a consistent form-field pattern, and a utility-first approach with the ClassNames.cn helper for Tailwind class merging. The codebase demonstrates strong engineering practices: extensive use of generics, expression trees for filtering, JS interop with guarded disposal, and a localization system with 200+ string keys. However, the large API surface, heavy JS interop, and limited test coverage (only a few unit tests for DataGrid and hierarchy utilities) present maintenance risks.
The LLM identified 4 files worth highlighting for reuse:
A self-contained utility for merging Tailwind CSS class strings with conflict resolution. It uses TailwindMerge.NET under the hood to handle class conflicts (e.g., padding, display, color) by allowing shorter classes to override longer ones. This component is isolated, has no internal dependencies beyond the TailwindMerge.NET package, and can be extracted into any Blazor or .NET project that needs intelligent CSS class composition.
A generic tree utility class that can build a hierarchy from nested or flat data, flatten it with sorting/filtering/pagination, and provide expand/collapse helpers. It is well-tested (HierarchyManagerTests.cs) and decoupled from any UI concerns. This component can be extracted and reused in any .NET project requiring hierarchical data manipulation, such as file explorers, org charts, or category trees.
Provides dual evaluation paths for filter definitions: ToFunc<T> for in-memory filtering via reflection, and ToExpression<T> for IQueryable/EF Core via expression trees. Handles nullable types, date presets, string comparisons with culture, and JSON serialization. This is a reusable data filtering engine that can be extracted into any .NET application needing dynamic query building with both in-memory and database support.
A base class for cascading state contexts used throughout the library (DialogContext, TabsContext, HoverCardContext, etc.). It provides a generic state container with OnStateChanged events, enabling child components to react to state changes without tight coupling. This pattern is reusable in any Blazor application that needs coordinated state between parent and child components via CascadingValue.