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 🙏

© 2026 – Pkg Stats / Ryan Hefner

notiv

v0.1.0

Published

Physics-based toast notification library for Vue 3 and Nuxt 3

Readme

notiv

Physics-based toast notification library for Vue 3 and Nuxt 3, with smooth SVG morphing pill animations.

Documentation & Playground →

Installation

npm install notiv

Vue 3 Setup

Register the plugin and add the <NotivToaster> component once in your app root:

// main.ts
import { createApp } from 'vue'
import { NotivPlugin } from 'notiv'
import 'notiv/style.css'
import App from './App.vue'

createApp(App).use(NotivPlugin).mount('#app')
<!-- App.vue -->
<script setup>
import { NotivToaster } from 'notiv'
</script>

<template>
  <NotivToaster position="top-right" theme="system" />
  <RouterView />
</template>

Nuxt 3 Setup

// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['notiv/nuxt'],
})

NotivToaster, useNotiv(), and notiv are all auto-imported. Add the toaster anywhere in your layout:

<!-- layouts/default.vue -->
<template>
  <NotivToaster position="top-right" theme="system" />
  <slot />
</template>

Usage

import { notiv } from 'notiv'

notiv.success({ title: 'Saved!', description: 'Your changes have been saved.' })
notiv.error({ title: 'Error', description: 'Something went wrong.' })
notiv.warning({ title: 'Warning', description: 'Check your input.' })
notiv.info({ title: 'Info', description: 'Update available.' })
notiv.loading({ title: 'Uploading...' })
notiv.action({ title: 'File deleted', button: { title: 'Undo', onClick: () => restoreFile() } })

Promise toasts

Show a loading toast that automatically transitions to success or error:

notiv.promise(fetchData(), {
  loading: { title: 'Loading...' },
  success: { title: 'Done!', description: 'Data loaded.' },
  error: { title: 'Failed', description: 'Could not load data.' },
})

// success/error can also be functions that receive the resolved value / error
notiv.promise(saveUser(data), {
  loading: { title: 'Saving...' },
  success: (user) => ({ title: `Welcome, ${user.name}!` }),
  error: (err) => ({ title: 'Save failed', description: err.message }),
})

Composable

<script setup>
import { useNotiv } from 'notiv'

const { notiv, toasts } = useNotiv()

function save() {
  notiv.success({ title: 'Saved!' })
}
</script>

Dismiss & clear

const id = notiv.loading({ title: 'Processing...' })

// dismiss a specific toast
notiv.dismiss(id)

// clear all toasts (optionally by position)
notiv.clear()
notiv.clear('top-right')

NotivToaster Props

| Prop | Type | Default | Description | |---|---|---|---| | position | NotivPosition | 'top-right' | Default position for all toasts | | theme | 'light' \| 'dark' \| 'system' | 'system' | Color theme | | offset | number \| string \| object | — | Viewport offset (px or CSS value) | | options | NotivOptions | — | Default options applied to all toasts |

Positions

top-left · top-center · top-right · bottom-left · bottom-center · bottom-right

Toast Options

| Option | Type | Default | Description | |---|---|---|---| | title | string | — | Toast title | | description | string | — | Secondary text | | type | NotivState | — | Toast state (success, error, warning, info, action, loading) | | position | NotivPosition | toaster default | Override position per toast | | duration | number \| null | 6000 | Duration in ms. null = persist forever | | icon | Component \| VNode \| null | — | Custom icon component | | fill | string | — | Custom badge fill color | | roundness | number | 16 | Badge corner radius (px) | | autopilot | boolean \| { expand?, collapse? } | true | Auto expand/collapse behavior | | button | { title: string, onClick: () => void } | — | Action button | | styles | NotivStyles | — | CSS class overrides for inner elements | | id | string | auto | Custom toast ID |

Nuxt-only: $notiv

const { $notiv } = useNuxtApp()
$notiv.success({ title: 'Hello from server context!' })

License

MIT