Awesome
BlazorStrap
Bootstrap 4/5 components for Blazor
Bootstrap 5
We do not include bootstrap.min.css in the package. This already exists in the blazor wasm and blazor server side templates.
Packages
-
Core Package handles all the logic / JSInterop
-
Display packages. These packages so the rendered components. V5 is for Bootstrap 5. V4 is for Bootstrap 4
-
Pre Release
Install
Blazor WebAssembly
- Modify your index.html with the following.
- Inside the
<head>
add<link href="YourAssemblyName.styles.css" rel="stylesheet">
)<link href="path_to_bootstrap.min.css" rel="stylesheet" integrity="if_needed" />"
- At the end of the
<body>
add<script src="_content/BlazorStrap/popper.min.js"></script>
- Inside the
- In
Program.cs
addbuilder.Services.AddBlazorStrap();
- In
_Imports.razor
add@using BlazorStrap.V5
Blazor Server Side
- Modify your _host.cshtml with the following.
- Inside the
<head>
add<link href="YourAssemblyName.styles.css" rel="stylesheet">
<link href="path_to_bootstrap.min.css" rel="stylesheet" integrity="if_needed" />"
- At the end of the
<body>
add<script src="_content/BlazorStrap/popper.min.js"></script>
- Inside the
- In
Program.cs
orStartup.cs
addServices.AddBlazorStrap();
to your build pipeline
- In
_Imports.razor
add@using BlazorStrap.V5
Bootstrap 4
We do not include bootstrap.min.css in the package. This already exists in the blazor wasm and blazor server side templates.
Install
Blazor WebAssembly
- Modify your index.html with the following.
- Inside the
<head>
add<link href="YourAssemblyName.styles.css" rel="stylesheet">
)<link href="path_to_bootstrap.min.css" rel="stylesheet" integrity="if_needed" />"
- At the end of the
<body>
add<script src="_content/BlazorStrap/popper.min.js"></script>
- Inside the
- In
Program.cs
addbuilder.Services.AddBlazorStrap();
- In
_Imports.razor
add@using BlazorStrap.V4
Blazor Server Side
- Modify your _host.cshtml with the following.
- Inside the
<head>
add<link href="YourAssemblyName.styles.css" rel="stylesheet">
<link href="path_to_bootstrap.min.css" rel="stylesheet" integrity="if_needed" />"
- At the end of the
<body>
add<script src="_content/BlazorStrap/popper.min.js"></script>
- Inside the
- In
Program.cs
orStartup.cs
addServices.AddBlazorStrap();
to your build pipeline
- In
_Imports.razor
add@using BlazorStrap.V4