Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork29
License
balmjs/balm-ui
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Next Generation Material UI for Vue.js
BalmUI is a modular and customizableMaterial Design UI library for Vue 3.
balm-ui@8supports for Vue 2
- Enterprise-class UI designed for web applications
- A set of high-quality Vue components/plugins/directives/utils out of the box
- Powerful theme customization in every detail
- Integrated a complete set of the latest Material Icons
- All components and plugins is highly customizable, and can be used individually
- TypeScript support (updating)
- Visitmaterial.balmjs.com
- Visitv8.material.balmjs.com (for Vue 2)
balm init vue my-projectcd my-projectyarn add balm-ui# ORnpm install --save balm-uiupdatebalm.config.js
getMaterial Icons without downloading (or, download and extract to
my-project/app/fonts)constapi=(mix)=>{if(mix.env.isDev){mix.copy('node_modules/balm-ui/fonts/*','app/fonts');}};
edit
my-project/config/balmrc.jsfor usingDart Sassmodule.exports={styles:{extname:'scss'}// Other Options...};
edit
my-project/app/styles/global/_vendors.scss/* import BalmUI styles*/@use'balm-ui/dist/balm-ui';
Recommend to use Sass in
/path/to/project-name/styles/_vendors.scss, and you can use more advanced style usage of the BalmUI.edit
my-project/app/scripts/main.jsimport{createApp}from'vue';importAppfrom'@/views/layouts/app';importBalmUIfrom'balm-ui';// Official Google Material ComponentsimportBalmUIPlusfrom'balm-ui/dist/balm-ui-plus';// BalmJS Team Material Componentsconstapp=createApp(App);app.use(BalmUI);// Mandatoryapp.use(BalmUIPlus);// Optionalapp.mount('#app');
edit
my-project/app/styles/global/_vendors.scss@use'balm-ui/components/core';@use'balm-ui/components/button/button';@use'balm-ui/components/icon/icon';@use'balm-ui/components/dialog/dialog';@use'balm-ui/plugins/alert/alert';
edit
my-project/app/scripts/main.jsimport{createApp}from'vue';importAppfrom'@/views/layouts/app';importUiButtonfrom'balm-ui/components/button';import$alertfrom'balm-ui/plugins/alert';constapp=createApp(App);app.use(UiButton);app.use($alert);app.mount('#app');
npm run dev
edit a vue component:
my-project/app/scripts/views/components/hello.vue<template><divclass="hello"> ...<!-- Add a test button --><ui-button@click="$alert('Hello BalmUI')">Click Me</ui-button></div></template>
npm run prod
vue-clivue create my-projectcd my-projectvite# npm 6.xnpm init @vitejs/app my-project --template vue# npm 7+, extra double-dash is needed:npm init @vitejs/app my-project -- --template vue# yarnyarn create @vitejs/app my-project --template vuecd my-project
yarn add balm-ui# ORnpm install --save balm-uivue-cli// vue.config.jsmodule.exports={runtimeCompiler:true,// NOTE: set alias via `configureWebpack` or `chainWebpack`configureWebpack:{resolve:{alias:{'balm-ui-plus':'balm-ui/dist/balm-ui-plus.js','balm-ui-css':'balm-ui/dist/balm-ui.css'}}}// chainWebpack: (config) => {// config.resolve.alias// .set('balm-ui-plus', 'balm-ui/dist/balm-ui-plus.js')// .set('balm-ui-css', 'balm-ui/dist/balm-ui.css');// }};
vite// vite.config.jsimport{defineConfig}from'vite';importvuefrom'@vitejs/plugin-vue';exportdefaultdefineConfig({plugins:[vue()],resolve:{alias:{vue:'vue/dist/vue.esm-bundler.js','balm-ui-plus':'balm-ui/dist/balm-ui-plus.esm.js','balm-ui-css':'balm-ui/dist/balm-ui.css'}}});
edit
my-project/src/main.jsimport{createApp}from'vue';importAppfrom'./App.vue';importBalmUIfrom'balm-ui';// Official Google Material ComponentsimportBalmUIPlusfrom'balm-ui-plus';// BalmJS Team Material Componentsimport'balm-ui-css';constapp=createApp(App);app.use(BalmUI);app.use(BalmUIPlus);app.mount('#app');
<!doctype html><htmllang="en"><head><metacharset="UTF-8"/><metaname="viewport"content="width=device-width, initial-scale=1.0"/><title>Hello BalmUI</title><linkrel="stylesheet"href="https://unpkg.com/balm-ui/dist/balm-ui.css"/></head><body><divid="app"><ui-buttonicon="add"@click="$alert(message)">SayHi</ui-button></div><scriptsrc="https://unpkg.com/vue"></script><scriptsrc="https://unpkg.com/balm-ui"></script><scriptsrc="https://unpkg.com/balm-ui/dist/balm-ui-plus.js"></script><script>constapp=Vue.createApp({setup(){varmessage='Hello BalmUI';return{ message};}});app.use(BalmUI);app.use(BalmUIPlus);app.mount('#app');</script></body></html>
Enjoy 👻
We'd love for you to contribute and make BalmUI even better than it is today! Please make sure to read theContributing Guide before making a pull request. You can submit any ideas aspull requests or asGitHub issues.
We officially support the last two versions of every major browser. Specifically, we test on the following browsers:
- Chrome on Android, Windows, macOS, and Linux
- Firefox on Windows, macOS, and Linux
- Safari on iOS and macOS
- Edge on Windows
About
Topics
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors12
Uh oh!
There was an error while loading.Please reload this page.