BlazorComponentUtilities 1.8.0

A clean code approach to conditional CSS Classes in Blazor Components (Razor Components). When building complex components for ASP.NET Blazor there are often CSS classes generated by multiple factors. Styles can often be added by system & component state, public parameters, and static base CSS classes. Combining many CSS classes together doesn't scale well, and when components get large it can be tough to reason about. The CSS builder pattern fixes this problem by offering a easy to repeat, easy to read pattern to use across components in a project.

No packages depend on BlazorComponentUtilities.

1.8.0 Fixed null ref error when using AddClassFromAttributes and passing a null attribute value. 1.7.1 Fixed trivial performance issue with redundant assignment when building strings 1.7.0 Added SetPrefix method to reduce reptititive class prefixing 1.6.0 Added Func<string> value overload for ValueBuilder 1.5.0 Added Func<string> value overload for StyleBuilder Minor performance improvements for .Add*Attributes 1.4.0 Added ValueBuilder for complex styles Updated /// docs 1.3.0 Added utlitiy mehtod for Attribute Splatting. Added utility method for returning null for empty strings. This is useful for splatting scenarios. Added utility method for starting off new builders.

.NET Standard 2.0

  • No dependencies.

Version Downloads Last updated
1.8.0 1 09.04.2024
1.7.1 0 30.07.2021
1.7.0 0 14.06.2021
1.6.0 0 24.01.2020
1.5.0 0 23.01.2020
1.4.0 0 23.01.2020
1.3.1 0 16.01.2020
1.3.0 0 05.01.2020
1.2.1 0 04.01.2020
1.1.0 1 09.04.2024
1.0.0 0 11.04.2019