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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@codamic/nuxt-vuetify-snack-stack

v1.0.3

Published

Show stackable vuetify snacks from anywhere

Readme

Nuxt Vuetify Snack Stack

npm version npm downloads License

This is a nuxt module which allows you to show stackable vuetify snacks from anywhere in your application

Dependencies

  • Nuxt 2 with nuxt-bridge
  • @nuxtjs/vuetify

Setup

  1. Make sure you have @nuxt/vuetify installed on your nuxt project
  2. If you haven't yet activate the nuxt store (simply put a empty index.ts in /store folder)
  3. Add @codamic/nuxt-vuetify-snack-stack dependency to your project
npm install @codamic/nuxt-vuetify-snack-stack
  1. Add @codamic/nuxt-vuetify-snack-stack to the modules section of nuxt.config.js
{
  modules: [
    // Simple usage
    '@codamic/nuxt-vuetify-snack-stack',

    // With options
    ['@codamic/nuxt-vuetify-snack-stack', { /* module options */ }]
  ]
}
  1. Add the <NuxtVuetifySnackStack /> component to your nuxt layout

Using top level options

{
  modules: [
    '@codamic/nuxt-vuetify-snack-stack'
  ],
  snackStack: {
    /* module options */
  }
}

Configuration

default configuration

snackStack: {
  timeout: 5000,
  types: {
    error: {
      icon: 'mdi-alert-circle-outline',
      color: 'error',
    },
    info: {
      icon: 'mdi-information-outline',
      color: 'info',
    },
    warning: {
      icon: 'mdi-alert-outline',
      color: 'warning',
    },
    success: {
      icon: 'mdi-check-circle-outline',
      color: 'success',
    },
  },
}

timeout: Number

set a new default timeout for all snacks

types: Object

Yout can simply add new types and change the existing one in your nuxt.config.ts

snackStack: {
  types: {
    custom: {
      icon: 'custom-icon',
      color: 'custom-color',
    },
    info: {
      icon: 'custom-info-icon',
      color: 'custom-info-color',
      timeout: 3000
    }
  }
}

Usage

Options API

You can call the snack plugin from any component in your project with $snack (or under your custom defined namespace)

show a snack

  this.$snack.showSnack('Awesome Message')

show a snack with options

  this.$snack.showSnack({
    text: 'Error Message',
    type: 'error',
    timeout: 4242,
  })

Compositions API

  useSnack().showSnack('Awesome Message')

  const { showSnack, ... } = useSnack()

Methods

.showSnack(msg: SnackMessage | string) show Snack

.showSnackWithType(type: string, msg: SnackMessage | string) show Snack

.showInfoSnack(msg: SnackMessage | string) show info snack

.showErrorSnack(msg: SnackMessage | string) show error snack

.showWarningSnack(msg: SnackMessage | string) show warning snack

.showSuccessSnack(msg: SnackMessage | string) show success snack

SnackMessage
{
  text: String,
  timeout: Number,
  icon: String,
  color: String, // Vuetify color or HEX RGB RGBA color value
}

Development

  1. Clone this repository
  2. Install dependencies using npm install

Test

  1. Clone this repository
  2. Install dependencies using npm install
  3. run unit tests npm run test

License

MIT License

Copyright (c) Codamic Innovations GmbH