English | 中文
This project is part of the .NET Foundation and operates under their code of conduct.
dotnet new install Bootstrap.Blazor.Templates::*
dotnet new bbapp
Microsoft Market link
dotnet add package BootstrapBlazor
Add the stylesheet
javascripts
file to your main index file - Pages/_Host.cshtml (Server)
or wwwroot/index.html (WebAssembly)
HTML
<!DOCTYPE html>
<html lang="en">
<head>
. . .
<link rel="stylesheet" href="https://github.com/dotnetcore/BootstrapBlazor/blob/main/_content/BootstrapBlazor/css/bootstrap.blazor.bundle.min.css">
</head>
<body>
. . .
<script src="https://github.com/dotnetcore/BootstrapBlazor/raw/main/_framework/blazor.server.js"></script>
<script src="https://github.com/dotnetcore/BootstrapBlazor/raw/main/_content/BootstrapBlazor/js/bootstrap.blazor.bundle.min.js"></script>
</body>
</html>
Open the ~/Startup.cs
file in the and register the Bootstrap Blazor
service:
C#
namespace BootstrapBlazorAppName
{
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
//more code may be present here
services.AddBootstrapBlazor();
}
//more code may be present here
}
}
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.
To use the Create New Project Wizard, install the Bootstrap Blazor
UI for Blazor Visual Studio Extensions. You can get it from the:
To start the wizard, use either of the following approaches
Chrome | Firefox | Safari | Android Browser & WebView | Microsoft Edge | |
---|---|---|---|---|---|
iOS | Supported | Supported | Supported | N/A | Supported |
Android | Supported | Supported | N/A | Android v5.0+ supported | Supported |
Windows 10 Mobile | N/A | N/A | N/A | N/A | Supported |
Chrome | Firefox | Internet Explorer | Microsoft Edge | Opera | Safari | |
---|---|---|---|---|---|---|
Mac | Supported | Supported | N/A | N/A | Supported | Supported |
Linux | Supported | Supported | N/A | N/A | N/A | N/A |
Windows | Supported | Supported | Supported, IE11+ | Supported | Supported | Not supported |
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information see the .NET Foundation Code of Conduct.
If this project is helpful to you, please scan the QR code below for a cup of coffee.