Bulma

Note: Bulma provider is still work in progress so some of the features may not work.


Installations

NuGet packages

First step is to install a Bulm provider for Blazorise:

Install Bulma provider from nuget.

Install-Package Blazorise.Bulma

You also need to install the icon package:

Install-Package Blazorise.Icons.FontAwesome

Source files

The next step is to change your index.html file and include the css and js source files:

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.2/css/bulma.min.css">
<script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>

Note: Don’t forget to remove default bootstrap css and js files that comes with the Blazor/RC project template. If you forget to remove them it’s possible that some of component will not work as they should be.

Usings

In your main Imports.razor add:

@using Blazorise

Registrations

Finally in the Startup.cs you must tell the Blazor to register Bulma provider and extensions:

using Blazorise;
using Blazorise.Bulma;
using Blazorise.Icons.FontAwesome;

public void ConfigureServices( IServiceCollection services )
{
  services
    .AddBlazorise( options =>
    {
      options.ChangeTextOnKeyPress = true;
    } ) // from v0.6.0-preview4
    .AddBulmaProviders()
    .AddFontAwesomeIcons();
}

Client-Side

public void Configure( IComponentsApplicationBuilder app )
{
  app.Services
    .UseBulmaProviders()
    .UseFontAwesomeIcons();

  app.AddComponent<App>( "app" );
}

Server-Side

public void Configure( IComponentsApplicationBuilder app )
{
  ...
  app.UseRouting();
  
  app.ApplicationServices
    .UseBulmaProviders()
    .UseFontAwesomeIcons();

  app.UseEndpoints( endpoints =>
  {
      endpoints.MapBlazorHub();
      endpoints.MapFallbackToPage( "/_Host" );
  } );
}

This step is mandatory only for projects built on top of Razor Components! For Blazor projects this step is not required! Normally these files would be downloaded automatically by the framework but since Razor Components still doesn’t support static files inside of class library you will need to manually include required js and css files into your project. Once the Blazor/RC team implements this feature this step will not we required.

First you must download bundle.zip from the release tab and extract it to your wwwroot folder. After extraction you will have to include files in your Index.cshtml eg.

<link href="blazorise.css" rel="stylesheet" />
<link href="blazorise.bootstrap.css" rel="stylesheet" />
<link href="blazorise.sidebar.css" rel="stylesheet" />
<link href="blazorise.snackbar.css" rel="stylesheet" />

<script src="blazorise.js"></script>
<script src="blazorise.bootstrap.js"></script>
<script src="blazorise.charts.js"></script>
<script src="blazorise.sidebar.js"></script>

etc.

There is also another option. You can try the library BlazorEmbedLibrary. Full instruction on how to use it can be found on their project page.