Blazorise Bootstrap 4 Usage

Quickly install Blazorise with Bootstrap 4, one of the world's most popular Blazor UI framework.

Install Packages

First step is to install a Bootstrap provider for Blazorise:
Install-Package Blazorise.Bootstrap
You also need to install the icon package:
Install-Package Blazorise.Icons.FontAwesome

Add Static Files

The next step is to change your index.html or _Layout.cshtml / _Host.cshtml file and include the CSS and JS source files:
	<!-- inside of head section -->
	<link rel="stylesheet" href="" integrity="sha384-zCbKRCUGaJDkqS1kPbPd7TveP5iyJE0EjAuZQTgFLD2ylzuqKfdKlfG/eSrtxUkn" crossorigin="anonymous">
	<link rel="stylesheet" href="">

	<link href="_content/Blazorise/blazorise.css" rel="stylesheet" />
	<link href="_content/Blazorise.Bootstrap/blazorise.bootstrap.css" rel="stylesheet" />
	<div id="app"></div>

	<!-- inside of body section and after the div/app tag  -->
	<!-- These are the standard js dependencies this provider tipically dependes upon, but Blazorise deems these as optional as Blazorise Components should work correctly without these  -->
	<script src="" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
	<script src="" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
	<script src="" integrity="sha384-VHvPCCyXqtD5DqJeNxl2dtTyhF78xXNXdkwX1CZeRusQfRKp+tA7hAShOK/B/fQ2" crossorigin="anonymous"></script>

Add Imports

In your main _Imports.razor add:
@using Blazorise

Register Services

Add the following lines to the relevant sections of Program.cs.
using Blazorise;
using Blazorise.Bootstrap;
using Blazorise.Icons.FontAwesome;

    .AddBlazorise( options =>
        options.Immediate = true;
    } )

PWA & Offline Support (optional)

For information about PWAs & offline support, please take a look at our PWA docs.

On this page