New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vue-notif

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-notif

vue v2 notification component which can be used either through js or html

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
142
increased by23.48%
Maintainers
1
Weekly downloads
 
Created
Source

Vue Notif
npm npm

Installation

npm install vue-notif --save

Usage

  • register the component "we use Bulma for styling the notification cards".

    import Vue from 'vue'
    window.EventHub = require('vuemit')
    
    Vue.component('MyNotification', require('vue-notif').default)
    
  • add the component to your page

    <div class="notif-container">
        <my-notification></my-notification>
    </div>
    
  • now call it either

    • from html

      <div class="notif-container">
          <my-notification
              title="title"
              body="body"
              type="success/error/primary/warning"
              :icon="false"
              :duration="1/2/etc.."
              :on-close="somefunction()">
          </my-notification>
      </div>
      
    • or from js

      EventHub.fire('showNotif', {
          title: 'title',
          body: 'body',
          type: 'success',
          duration: 1,
          icon: false,
          onClose(){
              // what happen when notification is closed
          }
      });
      
    proprequiredtypedefault
    title:x:stringnull
    body:x:stringnull
    type:x:stringinfo
    duration:x:numberin seconds / null "card will remain visible"
    icon:x:booltrue
    onClose:x:functionnull
  • clicking the card itself will dismiss the notification as well.

Keywords

FAQs

Package last updated on 03 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc