2021-04-12 18:11:57 +08:00
< h1 align = "center" > Bootstrap Blazor Component< / h1 >
2020-04-06 15:11:28 +08:00
2020-11-06 13:36:32 +08:00
< div align = "center" >
< h2 > A set of enterprise-class UI components based on Bootstrap and Blazor.< / h2 >
2023-02-02 02:29:11 +08:00
[![Security Status ](https://www.murphysec.com/platform3/v3/badge/1619783039836532736.svg )](https://github.com/ArgoZhang/BootstrapBlazor/blob/main/LICENSE)
[![oscs ](https://www.oscs1024.com/platform/badge/murphysecurity/murphysec.svg )](https://github.com/ArgoZhang/BootstrapBlazor/blob/main/LICENSE)
2021-12-05 09:55:40 +08:00
[![License ](https://img.shields.io/github/license/argozhang/bootstrapblazor.svg?logo=git&logoColor=red )](https://github.com/ArgoZhang/BootstrapBlazor/blob/main/LICENSE)
2020-11-06 13:36:32 +08:00
[![Nuget ](https://img.shields.io/nuget/v/BootstrapBlazor.svg?color=red&logo=nuget&logoColor=green )](https://www.nuget.org/packages/BootstrapBlazor/)
[![Nuget ](https://img.shields.io/nuget/dt/BootstrapBlazor.svg?logo=nuget&logoColor=green )](https://www.nuget.org/packages/BootstrapBlazor/)
[![Repo Size ](https://img.shields.io/github/repo-size/ArgoZhang/BootstrapBlazor.svg?logo=github&logoColor=green&label=repo )](https://github.com/ArgoZhang/BootstrapBlazor)
2021-04-12 18:11:57 +08:00
[![Commit Date ](https://img.shields.io/github/last-commit/ArgoZhang/BootstrapBlazor/main.svg?logo=github&logoColor=green&label=commit )](https://github.com/ArgoZhang/BootstrapBlazor)
2023-01-17 00:28:56 +08:00
[![Github build ](https://img.shields.io/github/actions/workflow/status/ArgoZhang/BootstrapBlazor/build.yml?branch=main&?label=main&logo=github )](https://github.com/ArgoZhang/BootstrapBlazor/actions?query=workflow%3A%22Build+Project%22+branch%3Amain)
2021-11-30 13:44:01 +08:00
[![codecov ](https://codecov.io/gh/dotnetcore/BootstrapBlazor/branch/main/graph/badge.svg?token=5SXIWHXZC3 )](https://codecov.io/gh/dotnetcore/BootstrapBlazor)
2020-11-06 13:36:32 +08:00
< / div >
2020-04-06 15:11:28 +08:00
2020-11-06 13:36:32 +08:00
English | < a href = "README.zh-CN.md" > 中文< / a >
2021-11-30 13:44:01 +08:00
---
2020-11-06 13:36:32 +08:00
## 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.
2021-01-12 12:33:18 +08:00
- Supports NET5. (Server-Side, WASM)
2020-11-06 13:36:32 +08:00
- Seamless integration with existing ASP.NET Core MVC and Razor Pages projects.
2021-01-12 12:33:18 +08:00
## Online Examples
2020-11-18 22:23:18 +08:00
[![website ](https://img.shields.io/badge/China-https://www.blazor.zone-success.svg?color=red&logo=buzzfeed&logoColor=red )](https://www.blazor.zone)
[![website ](https://img.shields.io/badge/Github-https://argozhang.github.io-success.svg?logo=buzzfeed&logoColor=green )](https://argozhang.github.io)
2020-11-06 13:36:32 +08:00
## Installation Guide
- Install .net core sdk [Offical website ](https://dotnet.microsoft.com/download )
2021-10-28 20:10:29 +08:00
- Install Visual Studio 2022 lastest [Offical website ](https://visualstudio.microsoft.com/vs/getting-started/ )
2020-11-06 13:36:32 +08:00
## Create a new project from the dotnet new template
1. Install the template
2022-11-09 13:34:44 +08:00
`dotnet new install Bootstrap.Blazor.Templates::*`
2020-11-06 13:36:32 +08:00
2. Create the Boilerplate project with the template
`dotnet new bbapp`
2021-01-12 12:33:18 +08:00
## Install Bootstrap Blazor Project Template
1. Download Project Template
Microsoft Market [link ](https://marketplace.visualstudio.com/items?itemName=Longbow.BootstrapBlazorUITemplate )
2. Double Click **BootstrapBlazor.UITemplate.vsix**
2020-11-06 13:36:32 +08:00
## 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`
2020-04-06 15:11:28 +08:00
2020-11-21 00:56:50 +08:00
2. **Add** the `stylesheet` `javascripts` file to your main index file - `Pages/_Host.cshtml (Server)` or `wwwroot/index.html (WebAssembly)`
2020-04-06 15:11:28 +08:00
2021-01-12 12:33:18 +08:00
**HTML**
2020-04-06 15:11:28 +08:00
2020-11-06 13:36:32 +08:00
```HTML
<!DOCTYPE html>
< html lang = "en" >
< head >
. . .
2020-11-20 00:03:27 +08:00
< link rel = "stylesheet" href = "_content/BootstrapBlazor/css/bootstrap.blazor.bundle.min.css" >
2020-11-06 13:36:32 +08:00
< / head >
< body >
. . .
< script src = "_framework/blazor.server.js" > < / script >
< script src = "_content/BootstrapBlazor/js/bootstrap.blazor.bundle.min.js" > < / script >
< / body >
< / html >
2021-01-12 12:33:18 +08:00
```
2020-04-06 15:11:28 +08:00
2020-11-06 13:36:32 +08:00
3. Open the `~/Startup.cs` file in the and register the `Bootstrap Blazor` service:
2020-04-06 15:11:28 +08:00
2021-01-12 12:33:18 +08:00
**C#**
2020-04-06 15:11:28 +08:00
2020-11-06 13:36:32 +08:00
```csharp
namespace BootstrapBlazorAppName
{
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
//more code may be present here
2021-01-12 12:33:18 +08:00
services.AddBootstrapBlazor();
2020-11-06 13:36:32 +08:00
}
2020-04-06 15:11:28 +08:00
2020-11-06 13:36:32 +08:00
//more code may be present here
}
}
```
2020-04-06 15:11:28 +08:00
2020-11-06 13:36:32 +08:00
## Visual Studio Integration
2020-04-06 15:11:28 +08:00
2020-11-06 13:36:32 +08:00
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.
2020-04-06 15:11:28 +08:00
2020-11-06 13:36:32 +08:00
1. Get the Wizard
2020-04-06 15:11:28 +08:00
2020-11-06 13:36:32 +08:00
To use the Create New Project Wizard, install the `Bootstrap Blazor` UI for Blazor Visual Studio Extensions. You can get it from the:
2020-04-06 15:11:28 +08:00
2020-11-06 13:36:32 +08:00
- Visual Studio Marketplace (for Windows)
2020-04-06 15:11:28 +08:00
2020-11-06 13:36:32 +08:00
2. 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
![chrome ](https://img.shields.io/badge/chrome->%3D57-success.svg?logo=google%20chrome&logoColor=red )
2023-09-11 23:32:39 +08:00
![firefox ](https://img.shields.io/badge/firefox->522-success.svg?logo=firefox%20browser&logoColor=red )
2020-11-06 13:36:32 +08:00
![edge ](https://img.shields.io/badge/edge->%3D16-success.svg?logo=microsoft%20edge&logoColor=blue )
![ie ](https://img.shields.io/badge/ie->%3D11-success.svg?logo=internet%20explorer&logoColor=blue )
![Safari ](https://img.shields.io/badge/safari->%3D14-success.svg?logo=safari&logoColor=blue )
![Andriod ](https://img.shields.io/badge/andriod->%3D4.4-success.svg?logo=android )
![oper ](https://img.shields.io/badge/opera->%3D4.4-success.svg?logo=opera&logoColor=red )
2021-01-12 12:33:18 +08:00
### Mobile devices
2020-11-06 13:36:32 +08:00
![ios ](https://img.shields.io/badge/ios-supported-success.svg?logo=apple&logoColor=white )
![Andriod ](https://img.shields.io/badge/andriod-suported-success.svg?logo=android )
![windows ](https://img.shields.io/badge/windows-suported-success.svg?logo=windows&logoColor=blue )
| | **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 |
2021-01-12 12:33:18 +08:00
### Desktop browsers
2020-11-06 13:36:32 +08:00
![macOS ](https://img.shields.io/badge/macOS-supported-success.svg?logo=apple&logoColor=white )
![linux ](https://img.shields.io/badge/linux-suported-success.svg?logo=linux&logoColor=white )
![windows ](https://img.shields.io/badge/windows-suported-success.svg?logo=windows )
| | 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 |
## Screenshots
2020-04-06 15:11:28 +08:00
2020-12-22 00:27:05 +08:00
![Toggle ](https://raw.githubusercontent.com/ArgoZhang/Images/master/BootstrapBlazor/Toggle.png "Toggle.png" )
![Toast ](https://raw.githubusercontent.com/ArgoZhang/Images/master/BootstrapBlazor/Toast.png "Toast.png" )
![Upload ](https://raw.githubusercontent.com/ArgoZhang/Images/master/BootstrapBlazor/Upload.png "Upload.png" )
![Upload2 ](https://raw.githubusercontent.com/ArgoZhang/Images/master/BootstrapBlazor/Upload2.png "Upload2.png" )
![Bar ](https://raw.githubusercontent.com/ArgoZhang/Images/master/BootstrapBlazor/Bar.png "Bar.png" )
![Pei ](https://raw.githubusercontent.com/ArgoZhang/Images/master/BootstrapBlazor/Pie.png "Pei.png" )
![Doughnut ](https://raw.githubusercontent.com/ArgoZhang/Images/master/BootstrapBlazor/Doughnut.png "Doughnut.png" )
2020-04-06 15:11:28 +08:00
2020-11-06 13:36:32 +08:00
## Contribution
2020-04-06 15:11:28 +08:00
2020-11-06 13:36:32 +08:00
1. Fork
2. Create Feat_xxx branch
3. Commit
4. Create Pull Request
2020-04-06 15:11:28 +08:00
2020-11-06 13:36:32 +08:00
## Donate
2020-04-06 15:11:28 +08:00
2021-01-12 12:33:18 +08:00
If this project is helpful to you, please scan the QR code below for a cup of coffee.
2020-04-06 15:11:28 +08:00
2020-12-22 00:27:05 +08:00
< img src = "https://raw.githubusercontent.com/ArgoZhang/Images/master/Donate/BarCode%402x.png" width = "382px;" / >