MDUIDocs
Copy llms.txt linkCopy llms-full.txt linkView this page in MarkdownDiscuss this page with ChatGPTDiscuss full project docs with ChatGPT
Preset Colors
Custom Color
Extract from Wallpaper
Please select a wallpaper
Getting Started
Overview Installation Usage TypeScript Support IDE Support Localization FAQ
AI-Assisted Development
Styles
Integration with Frameworks
Components
Functions
Libraries

Overview

Let's start with a basic page template that loads mdui from a CDN.

You are currently reading the documentation for mdui 2!

For mdui 1 documentation, please visit www.mdui.org/docs/.

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="https://unpkg.com/mdui@2/mdui.css" />
<script src="https://unpkg.com/mdui@2/mdui.global.js"></script>

To use 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 works 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="en">
  <head>
    <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="https://unpkg.com/mdui@2/mdui.css">
    <script src="https://unpkg.com/mdui@2/mdui.global.js"></script>
    <!-- Include the icon's CSS file if using the icon attribute -->

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