Vue.js Integration

NPM PackageVue 3+Composition API

Official Vue 3 package with full Composition API and Options API support.

Prerequisites
Vue 3.0 or higher
Node.js 16.0 or higher
A Suggesto account with at least one feedback board

Installation

1. Install the Package

Install the official Suggesto Vue package using npm, yarn, or pnpm:

Basic Usage

2. Import and Use the Component

Import the SuggestoWidget component and add it to your Vue application. Choose between Composition API or Options API:

Vue Component Usage

Finding Your Board ID
Replace xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx with your actual Board ID from the dashboard

How to get your Board ID:

  1. Go to your Suggesto dashboard
  2. Find your feedback board
  3. Click the three dots menu (⋯) on the board card
  4. Select "Copy Board ID" from the dropdown
  5. Replace the placeholder in the code with your Board ID
Opens in new tab

Composable Usage (Advanced)

Using the useSuggesto Composable

For more control over the widget lifecycle, use the useSuggesto composable directly:

Using the Composable

Nuxt.js Users

If you're using Nuxt.js, we recommend using the dedicated @suggesto/nuxt module for the easiest setup experience with zero configuration.

Widget Configuration

Dashboard-Only Configuration

All widget styling and behavior is configured through your Suggesto dashboard. The Vue component only requires the Board ID.

Available Event Handlers:

  • @ready: Emitted when widget is initialized
  • @feedback-submitted: Emitted when user submits feedback
  • @error: Emitted if widget encounters an error

Note: When using the composable, events are handled directly via the on() method rather than Vue component events.

Conditional Rendering

You can conditionally render the widget using Vue's reactivity system based on user authentication or other app state:

Conditional Widget Rendering

Recent Improvements (v1.0.1)

Event Queue System Fixed

Events are now properly queued and processed after widget loads. No more missed events due to timing issues!

Vue 3 Reactivity Improvements

Enhanced integration with Vue 3 Composition API and improved SSR compatibility for Nuxt applications.

Troubleshooting

SSR Issues in Nuxt.js

If you encounter server-side rendering errors, ensure the plugin is client-side only:

Widget not updating with reactive data

Make sure to use reactive refs or reactive data properties:

Event handlers not firing

Use Vue's event syntax with kebab-case for custom events:

Vue.js / Nuxt.js Installation - Suggesto.io Documentation