Skip to content

Nuxt

Get started with Vue Modals using Nuxt.

Installation

sh
npm add @outloud/nuxt-notifications
sh
pnpm add @outloud/nuxt-notifications
sh
yarn add @outloud/nuxt-notifications
sh
bun add @outloud/nuxt-notifications

Setup

1. Register Nuxt module

See Configuration for options.

ts
export default defineNuxtConfig({
  modules: [
    '@outloud/nuxt-notifications', 
  ],
  notifications: { /* options */ }
})

2. Add modals container component

The best place is to add it to your app.vue file or layout in layouts folder.

vue
<template>
  <div>
    ...

    <ONotificationsContainer />
  </div>
</template>

<script setup lang="ts">
import { ONotificationsContainer } from '@outloud/vue-notifications'
</script>