𧬠Fully modular with zero dependencies
Granularly include only the features you need
π Drop-in components to enhance notifications
NotivueSwipe, NotivueKeyboard, all optional and customizable
𧩠Headless API
Use your own notifications while Notivue handles the rest
π Dynamic Notifications
Update pending notifications with ease
π° Ready-made notifications included
Themes, icons, RTL support and much more
π’ Slick transitions and animations
Customize any animation with plain CSS
βΏοΈ Fully accessible
Built-in screen reader, reduced motion, and keyboard support
π« Nuxt and Astro modules
Buit-in Nuxt and Astro modules
pnpm add notivue
# npm i notivue
# yarn add notivue
# bun install notivue
π‘ See β below for Nuxt
main.js/ts
import { createApp } from 'vue'
import { createNotivue } from 'notivue'
import App from './App.vue'
import 'notivue/notifications.css' // Only needed if using built-in notifications
import 'notivue/animations.css' // Only needed if using built-in animations
const notivue = createNotivue(/* Options */)
const app = createApp(App)
app.use(notivue)
app.mount('#app')
App.vue
<script setup>
import { Notivue, Notification, push } from 'notivue'
</script>
<template>
<button @click="push.success('Hello from your first notification!')">Push</button>
<Notivue v-slot="item">
<Notification :item="item" />
</Notivue>
<!-- RouterView, etc. -->
</template>
Headless, with custom components
<script setup>
import { Notivue, push } from 'notivue'
</script>
<template>
<button @click="push.success('This is your first notification!')">Push</button>
<Notivue v-slot="item">
<!-- Your custom notification π -->
<div class="rounded-full flex py-2 pl-3 bg-slate-700 text-slate-50 text-sm">
<p :role="item.ariaRole" :aria-live="item.ariaLive">
{{ item.message }}
</p>
<button
@click="item.clear"
aria-label="Dismiss"
class="pl-3 pr-2 hover:text-red-300 transition-colors"
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
fill="currentColor"
class="w-5 h-5"
aria-hidden="true"
>
<path
fill-rule="evenodd"
d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z"
/>
</svg>
</button>
</div>
</Notivue>
<!-- RouterView, etc. -->
</template>
nuxt.config.ts
export default defineNuxtConfig({
modules: ['notivue/nuxt'],
css: [
'notivue/notifications.css', // Only needed if using built-in notifications
'notivue/animations.css' // Only needed if using built-in animations
],
notivue: {
// Options
}
})
app.vue
<template>
<button @click="push.success('Hello from your first notification!')">Push</button>
<Notivue v-slot="item">
<Notification :item="item" />
</Notivue>
<!-- NuxtLayout, NuxtPage, etc. -->
</template>
- Ionic Team for the icon sets
- Uktash Verna for the SVG spinner
MIT