Skip to content

Latest commit

 

History

History
53 lines (49 loc) · 2.19 KB

README.md

File metadata and controls

53 lines (49 loc) · 2.19 KB

BCSS

Revolutionary Runtime CSS Generator for Blazor

GitHub Repo stars GitHub last commit Contributors NuGet version NuGet downloads

BCSS .NET
1.0.0 .NET 6 - .NET 7 - .NET 8
1.0.1 .NET 8 - .NET 9

Installation

  1. Install CodeBeam.BCSS Nuget package
dotnet add package CodeBeam.BCSS
  1. Add the following to _Imports.razor
@using BCSS
  1. Add the following to your HTML body section, it's either index.html or _Layout.cshtml/_Host.cshtml depending on whether you're running Server-Side or WASM.
<script src="_content/CodeBeam.BCSS/Bcss.min.js"></script>
  1. Add the following to the relevant sections of Program.cs
using Bcss.Services;
builder.Services.AddBcss();
  1. Add the following toApp.razor
<BlazorCssProvider />
  1. Inject the service and place the component in the page that you want to use BCSS
@inject BcssService Bc

Usage

Add the BCSS class into a class

<div class="@Bc["w-200 h-100 r-20"]" />
//This line adds width: 200px height: 100px and border-radius: 20

Related Links