Skip to content

agantelin/nuxt3-notifications

 
 

Repository files navigation

Nuxt3 Notifications Module

Version License Nuxt

This is module @kyvg/vue3-notification for Nuxt3

📦 Get Started

  1. Install nuxt3-notifications as project dependency:
npm i nuxt3-notifications # npm
yarn add nuxt3-notifications # yarn
  1. Add it to the modules section of your nuxt.config:
export default defineNuxtConfig({
  modules: ['nuxt3-notifications'],
});

🚀 Example

<!-- app.vue -->
<template>
  <NuxtNotifications position="bottom left" :speed="500" />
</template>
<!-- page.vue/component.vue -->

<script setup>
  const { notify } = useNotification();

  function onClick() {
    notify({
      title: "Title",
      text: "Hello notify!",
    });
  }
</script>

<template>
  <button @click="onClick">Show notify</button>
</template>

🔨 Config

export default defineNuxtConfig({
  modules: ['nuxt3-notifications'],
  nuxtNotifications: {
    componentName: 'Foo' // 'foo-bar' or 'FooBar' for components of two or more words
  },
});

💻 Development

  • Fork and clone windx-foobar/nuxt3-notifications
  • Enable corepack using corepack enable (use npm i -g corepack for Node.js < 16.10)
  • Install dependencies using yarn install
  • Run yarn dev:prepare to generate type stubs.
  • Use yarn dev to start playground in development mode.

Releases

No releases published

Packages

No packages published

Languages

  • Vue 47.1%
  • JavaScript 23.9%
  • TypeScript 18.3%
  • EJS 10.7%