Home

Awesome

BlazorStrap

NuGet Pre Release Nuget (with prereleases) Nuget GitHub stars Gitter chat Gitter chat

Bootstrap 4/5 components for Blazor

Bootstrap 5 NuGet Pre Release

We do not include bootstrap.min.css in the package. This already exists in the blazor wasm and blazor server side templates.

Packages

Install

Blazor WebAssembly
    • Download BlazorStrap package from nuget: nuget
    • Download BlazorStrap.V5 package from nuget: nuget
      • Both packages should be the same version.
  1. Modify your index.html with the following.
    1. Inside the <head> add
      1. <link href="YourAssemblyName.styles.css" rel="stylesheet"> )
      2. <link href="path_to_bootstrap.min.css" rel="stylesheet" integrity="if_needed" />"
    2. At the end of the <body> add
      1. <script src="_content/BlazorStrap/popper.min.js"></script>
  2. In Program.cs add
    1. builder.Services.AddBlazorStrap();
  3. In _Imports.razor add
    1. @using BlazorStrap.V5

Blazor Server Side
    • Download BlazorStrap package from nuget: nuget
    • Download BlazorStrap.V5 package from nuget: nuget
      • Both packages should be the same version.
  1. Modify your _host.cshtml with the following.
    1. Inside the <head> add
      1. <link href="YourAssemblyName.styles.css" rel="stylesheet">
      2. <link href="path_to_bootstrap.min.css" rel="stylesheet" integrity="if_needed" />"
    2. At the end of the <body> add
      1. <script src="_content/BlazorStrap/popper.min.js"></script>
  2. In Program.cs or Startup.cs add
    1. Services.AddBlazorStrap(); to your build pipeline
  3. In _Imports.razor add
    1. @using BlazorStrap.V5

Bootstrap 4 NuGet Pre Release

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
    • Download BlazorStrap package from nuget: nuget
    • Download BlazorStrap.V4 package from nuget: nuget
      • Both packages should be the same version.
  1. Modify your index.html with the following.
    1. Inside the <head> add
      1. <link href="YourAssemblyName.styles.css" rel="stylesheet"> )
      2. <link href="path_to_bootstrap.min.css" rel="stylesheet" integrity="if_needed" />"
    2. At the end of the <body> add
      1. <script src="_content/BlazorStrap/popper.min.js"></script>
  2. In Program.cs add
    1. builder.Services.AddBlazorStrap();
  3. In _Imports.razor add
    1. @using BlazorStrap.V4

Blazor Server Side
    • Download BlazorStrap package from nuget: nuget
  1. Modify your _host.cshtml with the following.
    1. Inside the <head> add
      1. <link href="YourAssemblyName.styles.css" rel="stylesheet">
      2. <link href="path_to_bootstrap.min.css" rel="stylesheet" integrity="if_needed" />"
    2. At the end of the <body> add
      1. <script src="_content/BlazorStrap/popper.min.js"></script>
  2. In Program.cs or Startup.cs add
    1. Services.AddBlazorStrap(); to your build pipeline
  3. In _Imports.razor add
    1. @using BlazorStrap.V4

Extensions: