npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

v-alert-resource

v1.0.3

Published

This is a VueJs Library for notification in your application

Downloads

6

Readme

v-alert-resource

This is a VueJs Library for notification in your application

Installation

npm install --save v-alert-resource

Usage

In your main.js. kindly do this as this component has been registered globally:

import VAlertResource from 'v-alert-resource'

import 'v-alert-resource/dist/v-alert-resource.css'

Vue.use(VAlertResource)

Kindly load the component once in a global visible template like in App.vue

<v-alert></v-alert>

What matters is to use the v-alert-resource service to push message. in any script part of your SFC. You have this globally bind to Vue

this.$vAlertTimeout or Vue.vAlertTimeout // Used to set timeout period, this can be configured in a global component

this.$vAlertService or Vue.vAlertService

You can decide to use the following methods based on what you want to alert.

EG:
`this.$vAlertService.success('Hello World')`  
`this.$vAlertService.info('Hello World')`  
`this.$vAlertService.warning('Hello World')`  
`this.$vAlertService.error('Error was encountered', {name: 'name must not be empty'})`  // accepts default message and error message.

We have the following methods you can use to notify.

success: for success alert. Accepts HTML | string
warning: for warning alert. Accepts HTML | string
info: for information alert. Accepts HTML | string
error: Accepts Object | Array<HTML | string> | Array<Object>. eg  
clear: to destroy current open alert but alert disappears based on configured time.

v-alert-resource can be used as an:

Overlay: This is best used while the <v-alert></v-alert> is reference in a top level component that is always visible throughout the entire state of the angular app. such as usage in app.component and header layout component of your application.

No Overlay: This is best used if you need to override the overlay approach for a specific component and render it in that current component content. <v-alert [overlay]="false"></v-alert>. you can also choose to use this alert in every component like this but it is not advisable to do so.