chanan / BlazorStrap

Bootstrap 4 Components for Blazor Framework
https://blazorstrap.io
The Unlicense
919 stars 156 forks source link
blazor bootstrap4 bootstrap5

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="https://github.com/chanan/BlazorStrap/blob/master/YourAssemblyName.styles.css" rel="stylesheet"> )
      2. <link href="https://github.com/chanan/BlazorStrap/blob/master/path_to_bootstrap.min.css" rel="stylesheet" integrity="if_needed" />"
    2. At the end of the <body> add
      1. <script src="https://github.com/chanan/BlazorStrap/raw/master/_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.
  4. Modify your _host.cshtml with the following.
    1. Inside the <head> add
      1. <link href="https://github.com/chanan/BlazorStrap/blob/master/YourAssemblyName.styles.css" rel="stylesheet">
      2. <link href="https://github.com/chanan/BlazorStrap/blob/master/path_to_bootstrap.min.css" rel="stylesheet" integrity="if_needed" />"
    2. At the end of the <body> add
      1. <script src="https://github.com/chanan/BlazorStrap/raw/master/_content/BlazorStrap/popper.min.js"></script>
  5. In Program.cs or Startup.cs add
    1. Services.AddBlazorStrap(); to your build pipeline
  6. 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="https://github.com/chanan/BlazorStrap/blob/master/YourAssemblyName.styles.css" rel="stylesheet"> )
      2. <link href="https://github.com/chanan/BlazorStrap/blob/master/path_to_bootstrap.min.css" rel="stylesheet" integrity="if_needed" />"
    2. At the end of the <body> add
      1. <script src="https://github.com/chanan/BlazorStrap/raw/master/_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
    • Download BlazorStrap.V4 package from nuget: nuget
    • Both packages should be the same version.-
  4. Modify your _host.cshtml with the following.
    1. Inside the <head> add
      1. <link href="https://github.com/chanan/BlazorStrap/blob/master/YourAssemblyName.styles.css" rel="stylesheet">
      2. <link href="https://github.com/chanan/BlazorStrap/blob/master/path_to_bootstrap.min.css" rel="stylesheet" integrity="if_needed" />"
    2. At the end of the <body> add
      1. <script src="https://github.com/chanan/BlazorStrap/raw/master/_content/BlazorStrap/popper.min.js"></script>
  5. In Program.cs or Startup.cs add
    1. Services.AddBlazorStrap(); to your build pipeline
  6. In _Imports.razor add
    1. @using BlazorStrap.V4

Extensions: