Blazorify.Bootstrap 1.0.0-preview.251228105153

This is a prerelease version of Blazorify.Bootstrap.
dotnet add package Blazorify.Bootstrap --version 1.0.0-preview.251228105153
                    
NuGet\Install-Package Blazorify.Bootstrap -Version 1.0.0-preview.251228105153
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Blazorify.Bootstrap" Version="1.0.0-preview.251228105153" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Blazorify.Bootstrap" Version="1.0.0-preview.251228105153" />
                    
Directory.Packages.props
<PackageReference Include="Blazorify.Bootstrap" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Blazorify.Bootstrap --version 1.0.0-preview.251228105153
                    
#r "nuget: Blazorify.Bootstrap, 1.0.0-preview.251228105153"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Blazorify.Bootstrap@1.0.0-preview.251228105153
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Blazorify.Bootstrap&version=1.0.0-preview.251228105153&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Blazorify.Bootstrap&version=1.0.0-preview.251228105153&prerelease
                    
Install as a Cake Tool

Blazorify.Bootstrap

Bootstrap-powered components for Blazor with runtime Sass compilation (via Blazorify.Sass) and zero external tooling.

What you get

  • Bootstrap-styled components (BuiButton, BuiModal, BuiToast, etc.).
  • On-demand CSS per theme at /_blazorify/bootstrap/{theme}.css compiled with Dart Sass.
  • A bundled helper script at /_blazorify/bootstrap/scripts.js.
  • Simple DI and middleware extensions to plug everything into your app.

Quick start

Install the package:

dotnet add package Blazorify.Bootstrap

Add the namespace (e.g., _Imports.razor):

@using Blazorify.Bootstrap

Register services and middleware (Program.cs):

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddRazorPages();
builder.Services.AddServerSideBlazor();
builder.Services.AddBlazorify(); // components + Sass + resources

var app = builder.Build();

app.UseStaticFiles();
app.UseRouting();
app.UseBlazorify(); // exposes CSS + JS endpoints

app.MapBlazorHub();
app.MapFallbackToPage("/_Host");

app.Run();

Include the assets (e.g., in _Host.cshtml or wwwroot/index.html):

<link rel="stylesheet" href="/_blazorify/bootstrap/bootstrap.css" />
<script src="/_blazorify/bootstrap/scripts.js"></script>

Use components:

<BuiButton Variant="Variant.Primary">Click me</BuiButton>

Toasts (container + service):

@inject BuiToastService Toasts

<BuiToastContainer Placement="Placement.TopEnd" />

<BuiButton Variant="Variant.Secondary" @onclick="Notify">Show toast</BuiButton>

@code {
	private Task Notify() => Toasts.Success("Saved!");
}

Modals (provider + service):

@inject BuiModalService Modals

<BuiModalProvider />

<BuiButton Variant="Variant.Primary" @onclick="OpenModal">Open modal</BuiButton>

@code {
	private Task OpenModal() => Modals.Show<SampleModal>(opts => {
		opts.Centered = true;
		opts.Size = Size.Large;
		opts.Data<SampleModal>(c => c.Message, "Hello from modal");
	});
}

SampleModal.razor (example modal content component):

@namespace YourApp.Components
@inherits BuiContentComponentBase

<BuiModalHeader>
	<h5 class="modal-title">Sample modal</h5>
</BuiModalHeader>

<BuiModalBody>
	<p>@Message</p>
</BuiModalBody>

<BuiModalFooter>
	<BuiButton Variant="Variant.Primary" @onclick="Close">Close</BuiButton>
</BuiModalFooter>

@code {
	[CascadingParameter] public BuiModal? Modal { get; set; }
	[Parameter] public String? Message { get; set; }

	private Task Close() => this.Modal?.Close() ?? Task.CompletedTask;
}

Custom themes

Themes are compiled from embedded .scss files. The default bootstrap theme ships in this package with an index.scss entry point under Blazorify.Bootstrap.Resources.

Register your own theme (SCSS embedded in another assembly):

builder.Services.AddBlazorify(options => {
	options.Themes["mytheme"] = new() {
		Assembly = typeof(MyThemeMarker).Assembly, // any type from your theme assembly
		Namespace = "MyCompany.MyTheme.Resources"  // prefix for embedded SCSS resources
	};
});

Request it at:

<link rel="stylesheet" href="/_blazorify/bootstrap/mytheme.css" />

Each theme needs an index.scss entry under the provided namespace. All .scss resources are extracted to a temp folder and compiled with Dart Sass (powered by the Blazorify.Sass package).

Scripts endpoint

/_blazorify/bootstrap/scripts.js delivers helper JS for certain components (modals, file drop, etc.). Include it once per page before </body>.

Contributing

Issues and PRs are welcome. Please keep changes focused and describe the scenario your contribution improves.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-preview.251228105153 40 12/28/2025
1.0.0-preview.251224172625 126 12/24/2025
1.0.0-preview.251224162048 128 12/24/2025
1.0.0-preview.250629064338 100 6/29/2025
1.0.0-preview.250316080253 286 3/16/2025
1.0.0-preview.250316075848 163 3/16/2025
1.0.0-preview.250316074054 150 3/16/2025
1.0.0-preview.250316073640 140 3/16/2025
1.0.0-preview.250304171247 257 3/4/2025
1.0.0-preview.250226074835 100 2/26/2025
1.0.0-preview.250226074659 90 2/26/2025
1.0.0-preview.250219152311 103 2/19/2025
1.0.0-preview.250219141343 106 2/19/2025
1.0.0-preview.250211003935 134 2/11/2025
1.0.0-preview.250208104849 157 2/8/2025
1.0.0-preview.250208070719 99 2/8/2025
1.0.0-preview.250203103148 133 2/3/2025
1.0.0-preview.250203100641 126 2/3/2025
1.0.0-preview.250201172120 104 2/1/2025
1.0.0-preview.250201163744 115 2/1/2025
1.0.0-preview.250201161653 89 2/1/2025
1.0.0-preview.250131204015 90 1/31/2025
1.0.0-preview.250123012510 111 1/23/2025
1.0.0-preview.241219192904 146 12/19/2024
1.0.0-preview.241217113735 111 12/17/2024
1.0.0-preview.241216050723 99 12/16/2024
1.0.0-preview.241216044613 106 12/16/2024
1.0.0-preview.241215093454 100 12/15/2024
1.0.0-preview.241215085136 89 12/15/2024
1.0.0-preview.241214091419 93 12/14/2024
1.0.0-preview.241212223602 103 12/12/2024
1.0.0-preview.241210104546 95 12/10/2024
1.0.0-preview.241207115116 113 12/7/2024
1.0.0-preview.241129153734 95 11/29/2024
1.0.0-preview.241129153544 85 11/29/2024
1.0.0-alpha3 94 11/29/2024
1.0.0-alpha2 103 8/21/2024
1.0.0-alpha1 103 8/21/2024