Blazor-BlazorStrap

[删除(380066935@qq.com或微信通知)]

chanan/BlazorStrap: Bootstrap 4 Components for Blazor Framework (github.com)

BlazorStrap
Bootstrap 4 and Bootstrap 5 Components for Blazor Framework

Important: Target V5 for bootstrap 5


<PackageReference Include="BlazorStrap" Version="5.*.*" />

Bootstrap 5 Components for Blazor Framework


Install

Blazor WebAssembly

Download the V5.0 package from nuget: nuget

Modify your index.html with the following.

Inside the <head> add

<link href="YourAssemblyName.styles.css" rel="stylesheet"> )

At the end of the <body> add

<script src="_content/BlazorStrap/popper.min.js"></script>

<script src="_content/BlazorStrap/blazorstrap.js"></script>

In Program.cs add

builder.Services.AddBlazorStrap();

In _Imports.razor add

@using BlazorStrap

Blazor Server (Server-side Blazor)

Download the V5.0 package from nuget:nuget

Modify your _host.cshtml with the following.

Inside the <head> add

<link href="YourAssemblyName.styles.css" rel="stylesheet">

At the end of the <body> add

<script src="_content/BlazorStrap/popper.min.js"></script>

<script src="_content/BlazorStrap/blazorstrap.js"></script>

In Program.cs or Startup.cs add

Services.AddBlazorStrap(); to your build pipeline

In _Imports.razor add

@using BlazorStrap