Idiomatic Vue 3 plugin
app.use(ReachBellPlugin) is all it takes — no provide/inject wiring, no global state mutations. Plays nicely with Pinia, VueUse, and the Vue Test Utils harness.
Integration
Plug-and-play Vue 3 + Nuxt 3 SDK with a composable, four prebuilt widgets, and a typed event bus. Five lines in main.ts and you're live.
One package. For Nuxt, add @reachbell/nuxt instead.
npm install @reachbell/vue
# or
pnpm add @reachbell/vueInstall the plugin once, then call useReachBell() from any component.
// src/main.ts
import { createApp } from 'vue';
import { ReachBellPlugin } from '@reachbell/vue';
import App from './App.vue';
const app = createApp(App);
app.use(ReachBellPlugin, {
projectId: import.meta.env.VITE_REACHBELL_PROJECT_ID,
promptDelay: 8000,
utm: { source: 'app', medium: 'webpush' },
});
app.mount('#app');
// src/components/SubscribeBell.vue
<script setup lang="ts">
import { useReachBell } from '@reachbell/vue';
const { status, subscribe, identify, track } = useReachBell();
async function enable() {
await subscribe();
identify({ email: 'jane@acme.com', plan: 'pro' });
track('clicked_bell', { placement: 'header' });
}
</script>
<template>
<span v-if="status === 'subscribed'">You're in. We'll ping you.</span>
<button v-else @click="enable">Enable updates</button>
</template>Composable + widgets + Nuxt module. Segments, A/B tests, and automations all wired up from the same SDK call.
app.use(ReachBellPlugin) is all it takes — no provide/inject wiring, no global state mutations. Plays nicely with Pinia, VueUse, and the Vue Test Utils harness.
Use useReachBell() in any component, or drop <ReachBellPrompt />, <ReachBellBanner />, <ReachBellToast />, and <ReachBellCenter /> straight into your template.
A first-party @reachbell/nuxt module ships ReachBellPlugin via the auto-imports system and exposes runtime config for SSR-safe project IDs.
status, permission, and subscription are reactive refs. All track() event payloads are typed via your own EventMap declaration — autocompletion across the editor.
identify() and track() feed the same segment engine, A/B variant logic, and automations canvas in the ReachBell dashboard. No second integration needed.
6.6 KB gzipped for the headless core, widgets tree-shake separately so a banner-only build stays under 8 KB end to end.
Composable signatures, widget props, Nuxt module options, and SSR patterns live at docs.reachbell.com/integrations/vue.
FAQ
Everything teams usually ask before switching. Something missing? Email us — a human replies.
Yes. The Nuxt module registers the plugin only on the client (the Push API needs window) and reads NUXT_PUBLIC_REACHBELL_PROJECT_ID from runtime config for clean per-environment deploys.
We target Vue 3 (3.3 +). Vue 2 is in maintenance mode upstream, but the v0.x line of @reachbell/vue still supports it — pin to ^0 and you are good.
useReachBell() returns reactive refs you can sync into a Pinia store with watch(). The README has a copy-pasteable subscription store example.
Yes. Call promptDesigner.show() from the composable to open the soft prompt on demand — useful for tying the prompt to a specific CTA click instead of a delay.
Free for your first 1,000 subscribers. No credit card.
Free forever for your first 1,000 subscribers. Set up in five minutes — no credit card needed.
Start free today