Installing muse-ui with npm is recommended.
npm i muse-ui -S
CDN
<link rel="stylesheet" href="https://unpkg.com/muse-ui/dist/muse-ui.css">
<script src="https://unpkg.com/muse-ui/dist/muse-ui.js"></script>
Load fonts and icons.
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic">
<link rel="stylesheet" href="https://cdn.bootcss.com/material-design-icons/3.0.1/iconfont/material-icons.css">
Muse-UI is based on Vue 2.0 implementation and needs to be installed as a plugin for Vue.
import Vue from 'vue';
import MuseUI from 'muse-ui';
Vue.use(MuseUI);
const app = new Vue({
render (h) {
return h('mu-button', {}, 'Hello World');
}
});
MuseUI provides a very simple and optimized way to customize theme styles.
import MuseUI from 'muse-ui';
MuseUI.theme.add('myTheme', {
primary: MuseUI.Colors.blue,
secondary: MuseUI.Colors.pinkA200,
success: MuseUI.Colors.green,
warning: MuseUI.Colors.yellow600,
info: MuseUI.Colors.blue,
error: MuseUI.Colors.red,
}).use('myTheme');