Go to file
Argo Zhang 1aacef59b0
refactor(Layout): enhance layout styles (#4679)
* doc: 代码格式化

* refactor: 移除空属性

* refactor: 重新设计收起样式

* feat: Layout 组件支持 static 渲染模式

* fix(Widget): 修复报错问题

* chore: bump version 9.0.0-beta03

* style: 移除抽屉 padding 间隙

* refactor: 移除宽度计算样式

* doc: 后台示例更新登录信息栏

* doc: 格式化文档

* refactor: 样式独立文件

* doc: 精简样式

* refactor: 更新 Widget 组件与模板一致

* refactor: 修复调整结构组件状态不正确问题

* refactor: 重构方法提高性能

* refactor: 修复布尔值时不触发 OnStateChanged 回调问题

* refactor: 修复布尔值时不触发 OnStateChanged 回调问题

* test: 增加单元测试

* refactor: 精简代码提高效率

* refactor: 调整右侧边框样式

* chore: bump version 9.0.1-beta01

* doc: 移除 2019 文字

* doc: 移除 2019 文字

* refactor: 更改样式名称

* refactor: 重构侧边栏收起样式

* refactor: 更新 Menu 透明样式

* doc: 更新后台管理样式

* style: 兼容 Menu 组件

* style: 增加响应式布局

* refactor: 重构样式

* wip: 临时移除静态支持

* style: 微调样式

* refactor: 精简样式

* style: 微调 Menu 样式

* refactor: 增加层次

* style: 调整 Title 颜色

* style: 调整收起展开菜单宽度样式

* style: 增加菜单右侧边框线

* doc: 调整文档

* doc: 更新文档链接

* style: 合并样式

* style: 合并样式

* style: 整理 header-bar 样式

* refactor: 重构样式

* style: 层次化样式

* style: 层次化样式

* refactor: 移除 IsPage 参数

* refactor: 移除 static 判断逻辑

* style: 合并 Header 样式

* refactor: 移除侧边栏抽屉

* style: 合并样式

* refactor: 移除 SideWidth=“0” 设置

* refactor: 使用 div 元素渲染按钮

* refactor: 恢复脚本

* refactor: 重构代码

* doc: 移除 IsPage 文档

* doc: 更新开发工具名称
2024-11-16 23:35:07 +08:00
.gitee
.github
docs
localization
scripts
src refactor(Layout): enhance layout styles (#4679) 2024-11-16 23:35:07 +08:00
test refactor(Layout): enhance layout styles (#4679) 2024-11-16 23:35:07 +08:00
.dockerignore
.editorconfig
.filenesting.json
.gitattributes
.gitignore
.issuetracker
.tfignore
BootstrapBlazor.sln
CHANGELOG.md
CHANGELOG.zh-CN.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Directory.Build.props
exclusion.dic doc(Install): remove visual studio 2019 (#4670) 2024-11-16 01:36:44 +00:00
Framework.props
LICENSE
NuGet.Config
README.md
README.zh-CN.md
SECURITY.md

Bootstrap Blazor Component

Bootstrap Blazor is an enterprise-level UI component library based on Bootstrap and Blazor.

License Nuget Nuget Repo Size Commit Date Github build codecov

English | 中文


.NET Foundation

This project is part of the .NET Foundation and operates under their code of conduct.

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

website website

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 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="_content/BootstrapBlazor/css/bootstrap.blazor.bundle.min.css">
</head>
<body>
    . . .
    <script src="_framework/blazor.server.js"></script>
    <script src="_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#

namespace BootstrapBlazorAppName
{
    public class Startup
    {
        public void ConfigureServices(IServiceCollection services)
        {
            //more code may be present here
            services.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

chrome firefox edge ie Safari Andriod oper

Mobile devices

ios Andriod windows

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

Desktop browsers

macOS linux 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

Toggle Toast Upload Upload2 Bar Pei Doughnut

Contribution

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

Code of Conduct

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.

Donate

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