Skip to content

Kristianfriis/BlazorBeerCss

Repository files navigation

BlazorBeerCSS WIP

A repo to create a Blazor component library based on BeerCSS A demo can be seen here: Demo

Prerequisities

BlazorBeerCss .NET Support
6.0.x .NET 6 ✔️
6.1.x .NET 6 & .NET 7 ✔️

Quick Installation Guide

Install Package

dotnet add package BlazorBeerCss

Add the following to _Imports.razor

@using BlazorBeerCss

Change the article tag to below in the MainLayout.razor or App.razor

<BeerMain Responsive="BeerResponsive.Responsive">
  @Body
 </BeerMain>

Add the following to index.html (client-side) or _Host.cshtml (server-side) in the head

<link href="_content/BlazorBeerCss/css/beercss/beer.min.css" rel="stylesheet">
<script type="module" src="_content/BlazorBeerCss/css/beercss/beer.min.js"></script>
<script type="module" src="_content/BlazorBeerCss/css/beercss/material-dynamic-colors.min.js"></script>

Add the following to the relevant sections of Program.cs if you need to use the BeerToast service

using BlazorBeerCss.BeerToast;
builder.Services.AddSingleton<BeerToastService>();

Optional

Remove unused css in wwwwroot/css and remove the scaffolded css from MainLayout.razor.css and NavMenu.razor.css

About

A repo to create a Blazor component library based on https://github.com/beercss

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published