BCSS | .NET |
---|---|
1.0.0 | .NET 6 - .NET 7 - .NET 8 |
1.0.1 | .NET 8 - .NET 9 |
- Install CodeBeam.BCSS Nuget package
dotnet add package CodeBeam.BCSS
- Add the following to
_Imports.razor
@using BCSS
- 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>
- Add the following to the relevant sections of
Program.cs
using Bcss.Services;
builder.Services.AddBcss();
- Add the following to
App.razor
<BlazorCssProvider />
- Inject the service and place the component in the page that you want to use BCSS
@inject BcssService Bc
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