Skip to content

exentials/MdcBlazor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exentials.MdcBlazor & Exentials.MdcBlazor.Tools

Library for Blazor based on Material Design Component

Nuget Nuget


Key features are:

  • Build on Dotnet 5.0
  • Wrap of Material Design Component Web 10.0
  • Source of javascript code build in Typescript
  • Embedded Google Roboto Fonts and Material Icons for scenarios with no Internet access

Exentials.MdcBlazor wraps the base Mdc components, Exentials.MdcBlazor.Tools depens on them but aim to serve richer and productive controls with less markup and code.

Demo server application is available as docker container

docker run -it exentials/mdc-blazor-server-demo:latest

How to use the libraries

Blazor Server App

Install the library on the Server project

Install-Package Exentials.MdcBlazor

Install-Package Exentials.MdcBlazor.Tools

Add on the service registration section of your Startup.cs file

services.AddMdcBlazor();    // Enable MdcBlazor services
In your _Imports.razor add the components namespace:
@using Exentials.MdcBlazor
In your _Host.cshtml add a link reference to:
<link href="_content/Exentials.MdcBlazor/mdcBlazor.css" rel="stylesheet" />  <!-- develop -->
<!-- OR -->
<link href="_content/Exentials.MdcBlazor/mdcBlazor.min.css" rel="stylesheet" />  <!-- production -->
.
.
<body class="@MdcStyle.Typography">
Optionally to use the embedded Roboto fonts and Material Icons
<link href="_content/Exentials.MdcBlazor/roboto/roboto.css" rel="stylesheet" />
<link href="_content/Exentials.MdcBlazor/material-icons/material-icons.css" rel="stylesheet" />
and at the end after the blazor js script
<script type="module" src="_content/Exentials.MdcBlazor/mdcBlazor.js"></script> <!-- develop -->
<!-- OR -->
<script type="module" src="_content/Exentials.MdcBlazor/mdcBlazor.min.js"></script> <!-- production -->

Blazor WebAssembly App

Install the library on both Server and Client project

Install-Package Exentials.MdcBlazor

Server project: Add on the service registration section of Startup.cs file

services.AddMdcBlazor();    // Enable MdcBlazor services
In _Imports.razor add the components namespace:
@using Exentials.MdcBlazor
On Index.html (Client project) add a link reference to:
<link href="_content/Exentials.MdcBlazor/mdcBlazor.css" rel="stylesheet" />  <!-- develop -->
<link href="_content/Exentials.MdcBlazor/mdcBlazor.min.css" rel="stylesheet" />  <!-- production -->
.
.
<body class="@MdcStyle.Typography">
Optionally to use the embedded Roboto fonts and Material Icons
<link href="_content/Exentials.MdcBlazor/roboto/roboto.css" rel="stylesheet" />
<link href="_content/Exentials.MdcBlazor/material-icons/material-icons.css" rel="stylesheet" />
and at the end after the blazor js script
<script type="module" src="_content/Exentials.MdcBlazor/mdcBlazor.js"></script> <!-- develop -->

<script type="module" src="_content/Exentials.MdcBlazor/mdcBlazor.min.js"></script> <!-- production -->
On _Imports.razor (Client project) add the components namespace:
@using Exentials.MdcBlazor

MdcBlazor controls

Components Status Material docs
MdcBanner In progress material.io - github
MdcButton Complete material.io - github
MdcCard Complete material.io - github
MdcCheckbox Complete material.io - github
MdcChip In progress material.io - github
MdcCircularProgress Complete material.io - github
MdcDataTable In progress material.io - github
MdcDialog Complete material.io - github
MdcDrawer Complete material.io - github
MdcElevation Complete github
MdcFab Complete material.io - github
MdcIconButton Complete material.io - github
MdcImageList - material.io - github
MdcLayoutGrid Complete material.io - github
MdcLinearProgress Complete material.io - github
MdcList Complete material.io - github
MdcMenu In progress material.io - github
MdcRadio Complete material.io - github
MdcSegmentedButton - github
MdcSelect In progress github
MdcSlider In progress material.io - github
MdcSnackbar Complete material.io - github
MdcSwitch Complete material.io - github
MdcTabBar Complete material.io - github
MdcTextField Complete material.io - github
MdcTextarea Complete material.io - github
MdcTooltip In progress material.io - github
MdcTopAppBar Complete material.io - github
MdcTypography Complete github
MdcIcon Complete material.io

MdcBlazor.Tools controls

DataTableColumn

Simplify the table building by passing a data source and the columns definitions to display.

MdcSnackbarService

Handle a centralized queue of Snackbar messages. Must place <MdcSnackbarService/> on the main layout component. By injecting the SnackbarService, messages could be sent to the main control.

To see it action download and execute MdcBlazor.ServerDemo project

Todos

  • A lot of todos

License

MIT

About

Blazor component library based on Material Design Web

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published