Preset Colors
Custom Color
Extract Color from Wallpaper
Select a Wallpaper
Getting Started
Introduction Installation Usage TypeScript Support IDE Support Localization Frequently Asked Questions


You are currently reading the documentation for mdui 2!

For mdui 1 documentation, please visit

Let's begin by incorporating mdui into a basic page template using a CDN.

Getting Started

To use mdui, import the CSS and JS files from the CDN.

For npm installation instructions, refer to the Installation section.

Importing Files

Add the following lines to your page's <head> tag:

<link rel="stylesheet" href="">
<script src=""></script>

To utilize the icon attribute (for example, icon="search" in <mdui-button icon="search"></mdui-button>), include the CSS file for the icon. Refer to Using Material Icons for more information.

mdui operates independently of third-party libraries and is ready to use once the files are included.

Simplest Page Template

Below is the simplest page template. You can add more components and content to build your website.

<!doctype html>
<html lang="zh-CN">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, shrink-to-fit=no"/>
    <meta name="renderer" content="webkit"/>

    <link rel="stylesheet" href="">
    <script src=""></script>
    <!-- Include the icon's CSS file if using the icon attribute -->

    <title>Hello, world!</title>
    <mdui-button>Hello, world!</mdui-button>
On this page