Nuxt3 Notifications Module
This is module @kyvg/vue3-notification for Nuxt3
📦 Get Started
- Install
nuxt3-notifications
as project dependency:
npm i nuxt3-notifications
yarn add nuxt3-notifications
- Add it to the
modules
section of your nuxt.config
:
export default defineNuxtConfig({
modules: ['nuxt3-notifications'],
});
🚀 Example
<template>
<NuxtNotifications position="bottom left" :speed="500" />
</template>
<script setup>
const { notifiy } = 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'
},
});
💻 Development
- Run
npm run dev:prepare
to generate type stubs. - Use
npm run dev
to start playground in
development mode.