/MASA.Blazor

Blazor UI component library based on Material Design. Support Blazor Server, Blazor WebAssembly and MAUI Blazor.

Primary LanguageC#MIT LicenseMIT

MASA Blazor Logo

MASA Blazor

A set of standard basic component libraries based on Material design specifications and BlazorComponent interaction capabilities

MASA.Blazor .NET Nuget Nuget

English| 简体中文

What is MASA Blazor?

Provide a standard basic component library based on Material design specifications and BlazorComponent's interactive capabilities. Provides preset components for standard scenarios such as layout, frame standard, Loading, and global exception handling. Starting from more practical scenarios, to meet the needs of more users and scenarios, and to minimize the time cost of developers. Shorten the development cycle and improve development efficiency. And provide a set of examples of Web solutions - MASA Blazor Pro has a variety of common scenes and preset layouts and other exciting content.

Why choose MASA Blazor?

MASA Blazor is based on the Material design specification, and each component is carefully designed, with modularity, responsiveness and excellent performance. MASA Blazor is regularly maintained and upgraded by a professional full-time technical team, efficient response speed, diversified solutions, long-term support, and enterprise-level support. At present, it has been used in several well-known companies, and the follow-up MASA Stack product series will continue to be used. In addition to ensuring the quality of the project, it can also continue to add new components and functions. In addition to providing developers with many mid- and Taiwan-based open source projects, MASA Stack, one of its most basic components, MASA Blazor, also hopes to be the most practical component library.

Feature

  • Rich components: Contains the basic components of Vuetify 1:1 restoration, as well as many practical preset components and deep integration functions of .Net, including three linkages of Url, breadcrumbs, navigation, advanced search, i18n, etc.
  • UI design language: modern design style, excellent UI multi-end experience design
  • Professional example: MASA Blazor Pro provides preset layouts for a variety of common scenarios
  • Easy to get started: rich and detailed getting started documents, free video tutorials (in production)
  • Active community encouragement: users participate in real-time interaction, make contributions to join us, and build the most open open source community
  • Long-term support: full-time team maintenance, long-term support, and enterprise-level support
  • Choice of well-known companies: This technology framework has been chosen by many well-known companies, and the MASA Stack product line will continue to be used in the future, and new functions will continue to be added

Stats

Alt

Getting started

Development environment setup

Install Template

dotnet new --install Masa.Template

Create Project

  • Blazor Server
dotnet new masabp -o Masa.Test
  • Blazor WebAssembly
dotnet new masabp --mode Wasm -o Masa.TestWasm
  • Blazor RCL
dotnet new masabp --mode ServerAndWasm -o Masa.TestRcl

Go to the Server project directory

cd Masa.Test

Run

dotnet run

Existing project

  • Install Nuget package
dotnet add package Masa.Blazor
  • Add Masa.Blazor related services to Startup.ConfigureServices:
services.AddMasaBlazor();
  • Introduce styles, fonts, scripts in wwwroot/index.html(WebAssembly) or Pages/_Host.cshtml(Server):
<html lang="en">
    <head>
        <!--Style-->
        <link href="_content/Masa.Blazor/css/masa-blazor.min.css" rel="stylesheet">
        <!--Font-->
        <link href="https://cdn.jsdelivr.net/npm/@("@mdi")/font@7.1.96/css/materialdesignicons.min.css" rel="stylesheet">
        <link href="https://fonts.googleapis.com/css?family=Material+Icons" rel="stylesheet">
        <link href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" rel="stylesheet">
    </head>
    <body>
        <!--Script (try to put it at the end of the body)-->
        <script src="_content/BlazorComponent/js/blazor-component.js"></script>
    </body>
</html>
  • Add the namespace to the _Imports.razor file:
@using Masa.Blazor
@using BlazorComponent
  • Modify the Shared/MainLayout.razor file to make MApp the root element:
<MApp>
    //Other layout content
</MApp>

See more :https://blazor.masastack.com/

Local development

Development environment setup

Clone code

git clone --recursive https://github.com/masastack/MASA.Blazor.git
cd MASA.Blazor
git submodule foreach git checkout main

Run doc server

cd Doc/Masa.Blazor.Doc.Server
dotnet run

Visit

Recommended use chrome or edge to visit http://localhost:5000/

Related resources

Related projects

Supported browsers

chromefirefoxedgeieSafarioper

Mobile devices

iosAndriod

Chrome Firefox Safari Microsoft Edge
iOS Supported Supported Supported Supported
Android Supported Supported N/A Supported

Desktop devices

macOSlinuxwindows

Chrome Firefox Safari Opera Microsoft Edge Internet Explorer
Mac Supported Supported Supported Supported N/A N/A
Linux Supported Supported N/A N/A N/A N/A
Windows Supported Supported Not supported Supported Supported Supported, IE11+

Due to WebAssembly restriction, Blazor WebAssembly doesn't support IE browser, but Blazor Server supports IE 11† with additional polyfills. See official documentation

How to contribute

  1. Fork & Clone
  2. Create Feature_xxx branch
  3. Commit with commit message, like feat:add MButton
  4. Create Pull Request

Contributors

Thanks to all the friends who have contributed to this project.

Interactive

QQ group WX public account WX Customer Service
masa.blazor-qq masa.blazor-weixin masa.blazor-weixin

Development team

The Digital Flash technical team is an efficient, stable and innovative team. The team adheres to the original intention of enriching the Blazor ecosystem, and it is the pursuit of the Digital Flash technical team to continue to work hard to bring a better experience to the developers. Thank you for your support and use.

Code of conduct

This project adopts the code of conduct defined in the "Contributors Convention" to clarify the expected behavior of our community. For more information, see MASA Stack Community Code of Conduct.

License

Masa.Blazor

Copyright (c) 2021-present Masa.Blazor