Skip to content

Repository files navigation

Bootstrap Blazor Component

A set of enterprise-class UI components based on Bootstrap and Blazor.

LicenseNugetNugetRepo SizeCommit DateGithub buildcodecov

English | 中文


Features

  • Enterprise-class UI designed for web applications.
  • A set of high-quality Blazor components out of the box.
  • Supports WebAssembly-based client-side and SignalR-based server-side UI event interaction.
  • Supports Progressive Web Applications (PWA).
  • Build with C#, a multi-paradigm static language for an efficient development experience.
  • .NET Standard 2.1 based, with direct reference to the rich .NET ecosystem.
  • Supports NET5. (Server-Side, WASM)
  • Seamless integration with existing ASP.NET Core MVC and Razor Pages projects.

Online Examples

websitewebsite

Installation Guide

Create a new project from the dotnet new template

  1. Install the template

dotnet new install Bootstrap.Blazor.Templates::*

  1. Create the Boilerplate project with the template

dotnet new bbapp

Install Bootstrap Blazor Project Template

  1. Download Project Template

Microsoft Market link

  1. Double Click BootstrapBlazor.UITemplate.vsix

Import Bootstrap Blazor into an existing project

  1. Go to the project folder of the application and install the Nuget package reference

dotnet add package BootstrapBlazor

  1. Add the stylesheetjavascripts file to your main index file - Pages/_Host.cshtml (Server) or wwwroot/index.html (WebAssembly)

HTML

<!DOCTYPE html><htmllang="en"><head>
. . .
<linkrel="stylesheet" href="_content/BootstrapBlazor/css/bootstrap.blazor.bundle.min.css"></head><body>
. . .
<scriptsrc="_framework/blazor.server.js"></script><scriptsrc="_content/BootstrapBlazor/js/bootstrap.blazor.bundle.min.js"></script></body></html>
  1. Open the ~/Startup.cs file in the and register the Bootstrap Blazor service:

C#

namespaceBootstrapBlazorAppName{publicclassStartup{publicvoidConfigureServices(IServiceCollectionservices){//more code may be present hereservices.AddBootstrapBlazor();}//more code may be present here}}

Visual Studio Integration

To create a new Bootstrap Blazor UI for Blazor application, use the Create New Project Wizard. The wizard detects all installed versions of Bootstrap Blazor for Blazor and lists them in the Version combobox—this enables you to start your project with the desired version. You can also get the latest version to make sure you are up to date.

  1. Get the Wizard

To use the Create New Project Wizard, install the Bootstrap Blazor UI for Blazor Visual Studio Extensions. You can get it from the:

  • Visual Studio Marketplace (for Windows)
  1. Start the Wizard

To start the wizard, use either of the following approaches

Using the Project menu:

  • Click File > New > Project.
  • Find and click the C# Blazor Application option (you can use the search, or filter by Blazor templates).
  • Follow the wizard.

Supported browsers

chromefirefoxedgeieSafariAndriodoper

Mobile devices

iosAndriodwindows

ChromeFirefoxSafariAndroid Browser & WebViewMicrosoft Edge
iOSSupportedSupportedSupportedN/ASupported
AndroidSupportedSupportedN/AAndroid v5.0+ supportedSupported
Windows 10 MobileN/AN/AN/AN/ASupported

Desktop browsers

macOSlinuxwindows

ChromeFirefoxInternet ExplorerMicrosoft EdgeOperaSafari
MacSupportedSupportedN/AN/ASupportedSupported
LinuxSupportedSupportedN/AN/AN/AN/A
WindowsSupportedSupportedSupported, IE11+SupportedSupportedNot supported

Screenshots

ToggleToastUploadUpload2BarPeiDoughnut

Contribution

  1. Fork
  2. Create Feat_xxx branch
  3. Commit
  4. Create Pull Request

Donate

If this project is helpful to you, please scan the QR code below for a cup of coffee.

About

The extensions package of Bootstrap Blazor

Resources

Code of conduct

Contributing

Stars

37 stars

Watchers

6 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages