Skip to content

WeNotification ​

Renders the notifications created with useNotify. It wraps Notivue's <Notivue> + <Notifications> with a theme based on Notivue's materialTheme (layout, shadows, icons) whose colors come from the active Vuetify theme (surface, success, error, warning, info and their on-* colors), so notifications follow light/dark switches.

It requires the notify feature (enabled by default), which installs notivue/nuxt.

Usage ​

Place it once, at the root of the app:

vue
<!-- app.vue -->
<template>
  <we-notification />

  <NuxtLayout>
    <NuxtPage />
  </NuxtLayout>
</template>

Then notify from anywhere:

ts
const $notify = useNotify()
$notify.success('Saved')

Props ​

PropTypeDefaultDescription
themeNotivueThemeundefined--nv-* variables merged over the default theme
vue
<template>
  <we-notification :theme="{ '--nv-radius': '4px', '--nv-success-bg': '#2e7d32' }" />
</template>

Styling ​

  • Notifications have z-index: 9999 (--nv-z on :root)
  • Long messages wrap anywhere, so unbreakable strings (URLs, tokens) don't overflow

Source Code ​