JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q57591F
  • License MIT

Throw a snackbar notification from any component using this.$notify(message)

Package Exports

  • vue-mdl-snackbar

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vue-mdl-snackbar) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Vue + MDL Snackbar

To Use

Copy and paste this snippet into your application (hint: I made it a Snackbar.vue component)

<div id="snackbar-notification" class="mdl-js-snackbar mdl-snackbar">
  <div class="mdl-snackbar__text"></div>
  <button class="mdl-snackbar__action" type="button"></button>
</div>

Import VueSnackbar into your main.js file

include VueSnackbar from 'vue-mdl-snackbar'

Install the plugin by running the following in your main.js:

Vue.plugin(VueSnackbar, '#snackbar-notification')

Run the following on any component to push a snackbar notification

this.$notify(message)

Build Setup

# install dependencies
npm install

# build for production
npm run build