Material design for Vue.js
Find a file
Marcos Moura 005ed81bf2 Merge branch 'components/mdSnackbar' of https://github.com/marcosmoura/vue-material into components/mdSnackbar
* 'components/mdSnackbar' of https://github.com/marcosmoura/vue-material:
  fix md-tabs with v-if and fix whiteframe
  add support for theming on Cards (#173)
  [release] 0.4.1
  [build] 0.4.1
  fix tooltip not being removed. fix #156
  fix disabled selects being selectable. fix #159
  resize textarea when a value change fix #160
  revert dialog example
  add scrollbar behaviour in dialog content fix #161
  start improvement over huge dialog content
  create custom tags in whiteframe component (#170)
  fix undefined object.values method and emit @change event (#167)
  add reference of currentPage in mdTablePagination (#166)
  add code sample to switch (#158)
  update prompt code example to be a prompt (#151)
2016-12-09 17:51:58 -02:00
.github Create .github files and improve readme 2016-11-21 21:22:54 -02:00
build fix release script 2016-12-05 02:07:45 -02:00
dist [build] 0.4.1 2016-12-08 10:48:37 -02:00
docs fix md-tabs with v-if and fix whiteframe 2016-12-09 00:47:32 -02:00
src fix md-tabs with v-if and fix whiteframe 2016-12-09 00:47:32 -02:00
.babelrc add ES2017 polyfill 2016-12-09 17:51:53 -02:00
.editorconfig Order 2016-07-13 02:39:15 -03:00
.eslintrc Improve logic of selection inside table 2016-10-26 21:59:51 -02:00
.gitignore Remove old rules 2016-10-17 00:19:12 -02:00
LICENSE Add LICENSE 2016-10-14 11:42:59 -03:00
package.json Merge branch 'components/mdSnackbar' of https://github.com/marcosmoura/vue-material into components/mdSnackbar 2016-12-09 17:51:58 -02:00
README.md add vue as dependency 2016-12-05 02:45:24 -02:00
versions.json [build] 0.4.1 2016-12-08 10:48:37 -02:00
yarn.lock add ES2017 polyfill 2016-12-09 17:51:53 -02:00

Material Design for Vue.js

Downloads

Version

License

Vue Material is lightweight framework built exactly according to the Material Design specs.

It aims to deliver a collection of reusable components and a series of UI Elements to build applications with support to all modern Web Browsers through Vue 2.

Build powerful and well-designed web apps that can can fit on every screen. You can generate and use themes dynamically, use components on demand, take advantage of UI Elements and Components with an ease-to-use API.

Demo and Documentation

Demo

Installation

Import Roboto and Material Icons from Google CDN:

<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic">
<link rel="stylesheet" href="//fonts.googleapis.com/icon?family=Material+Icons">

Install Vue Material through npm or yarn

npm install --save vue-material
yarn add vue-material

* Others package managers like JSPM and Bower are not supported yet.

Import or require Vue and Vue Material in your code:

import Vue from 'vue'
import VueMaterial from 'vue-material'
import 'vue-material/dist/vue-material.css'

// OR

var Vue = require('vue')
var VueMaterial = require('vue-material')
require('vue-material/dist/vue-material.css')

Alternativelly you can download and reference the script and the stylesheet in your HTML:

<link rel="stylesheet" href="path/to/vue-material.css">
<script src="path/to/vue-material.js"></script>

Usage

Enable Vue Material in your application using Vue.use(). You can always enable individual components:

Vue.use(VueMaterial)

// OR

Vue.use(VueMaterial.mdCore) //Required to boot vue material
Vue.use(VueMaterial.mdButton)
Vue.use(VueMaterial.mdIcon)
Vue.use(VueMaterial.mdSidenav)
Vue.use(VueMaterial.mdToolbar)

To get Vue Material working properly, you'll need to configure and apply a default theme.

Vue.material.theme.register('default', {
  primary: 'cyan',
  accent: 'pink'
})

Or you can register multiple themes at once.

Vue.material.theme.registerAll({
  default: {
    primary: 'cyan',
    accent: 'pink'
  },
  phone: {
    primary: 'indigo',
    accent: 'pink'
  }
})

Apply your theme using v-md-theme directive:

<div v-md-theme="'default'"></div>
<div v-md-theme="'phone'"></div>

Browser Support

Vue Material supports the latest version of all Browsers. This means:

  • Google Chrome 50+
  • Firefox 48+
  • Safari 9+
  • Opera 40+
  • IE 11
  • Edge May work in other browsers but it's untested.

Changelog

Changelog

Contributing

Please make sure to read the Contributing Guide before making a pull request.

Credits and Thanks

  • This library aims to delivery components using almost the same API of Angular Material
  • Thanks a lot to elviskang for donating the npm package name!
  • Thanks to Evan You for allowing me to use Vue.js Logo.

Internal Dependencies

You don't need to include any other library to work with vue-material. The focus of this project is to have a standalone build with no external dependence, but aiming to deliver the best experience without break the compatibility with the Vue.js core.

License

MIT