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

  • 1.1.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
132
increased by10%
Maintainers
1
Weekly downloads
 
Created
Source

Vue Notif

npm npm

Installation

npm install vue-notif --save

Usage

1- register the component

  • we use Bulma for styling the notification cards.
window.Vue = require('vue')
window.EventHub = require('vuemit')

Vue.component('MyNotification', require('vue-notif'))

2- now call it either

  • from html

    // for example when the backend is redirecting back with a msg
    <div class="notif-container">
        @if (session('status'))
            <my-notification
                icon="false"
                title="title"
                body="body"
                type="success/error/primary/warning"
                duration="1/2/etc..">
            </my-notification>
        @endif
    </div>
    
  • or from js

    EventHub.fire('showNotif',{
        title: 'title',
        body: 'body',
        type: 'success',
        duration: 1,
        icon: false,
        onClose(){
            // what happen when notification is closed
        }
    });
    
    <div class="notif-container">
        <my-notification></my-notification>
    </div>
    
  • type > default: info
  • duration > default: null if not present, card will remain visible
  • icon > default: true

Keywords

FAQs

Package last updated on 31 Dec 2017

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