Skip to content
CSS in Blazor Components
Branch: master
Clone or download
Latest commit 3656a83 Sep 23, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Docs Sep 23, 2019
src Docs Sep 23, 2019
.gitattributes Add .gitignore and .gitattributes. May 22, 2019
.gitignore #30 Aug 12, 2019
BlazorStyled.sln Themes! Sep 3, 2019
LICENSE Initial commit May 22, 2019 #36 documentation Aug 13, 2019


CSS in Blazor Components


View the detailed docs at


NuGet Pre Release

Why BlazorStyled?

  • Maintain your css inside your component instead of a seperate file
  • Eliminate all collisions - no need to use !important
  • No need to worry about depoying css files - great for libraries
  • css are C# strings - use variables instead of solutions like sass


Short Example

<Styled @bind-Classname="@hover">
    label: hover-example;
    padding: 32px;
    background-color: hotpink;
    font-size: 24px;
    border-radius: 4px;

<Styled Classname="@hover" PseudoClass="PseudoClasses.Hover">
    color: @color;

<div class="@hover">
    Hover to change color.

@code {
    private string hover;
    private string color = "white";

See more in the docs at

You can’t perform that action at this time.