Nuxt.js Integration

NPM ModuleNuxt 3+ & 4+Zero Config

Official Nuxt module for seamless integration with zero configuration. The easiest way to add Suggesto to your Nuxt application.

Zero Configuration

Just add your Board ID to nuxt.config.ts - everything else is handled automatically

SSR Compatible

Automatically loads client-side only, preventing SSR hydration issues

Runtime Config

Supports Nuxt's runtime configuration for environment-specific settings

Prerequisites
Nuxt 3.0 or higher (Nuxt 4.0+ also supported)
Node.js 16.0 or higher
A Suggesto account with at least one feedback board

Installation

1. Install the Module

Install the official Suggesto Nuxt module:

2. Configure the Module

Add the module to your nuxt.config.ts and configure your Board ID:

nuxt.config.ts

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
That's It! 🎉

The Suggesto widget is now automatically active on all pages of your Nuxt application! The module handles everything:

  • Client-side only loading (no SSR issues)
  • Automatic widget initialization
  • Runtime configuration management
  • TypeScript support

Usage

Automatic Widget Loading

Once configured, the widget works automatically. No additional code needed in your components:

pages/index.vue

Advanced Configuration

Custom Base URL

If you're using a custom Suggesto instance, you can specify a custom base URL:

nuxt.config.ts

Programmatic Control (Advanced)

Access the widget instance for programmatic control and event handling. This works alongside the automatic widget loading:

components/FeedbackButton.vue

New in v1.0.4: Singleton pattern ensures no conflicts between auto-loading and manual control. You can safely use both approaches simultaneously!

Environment-Specific Configuration

Using Environment Variables

Use environment variables for different Board IDs across environments:

nuxt.config.ts

Conditional Loading

Create a plugin for environment-specific logic:

plugins/suggesto-conditional.client.ts

Module Configuration Options

Available Options
boardId

Your Suggesto board ID (required)

baseUrl

Custom Suggesto instance URL (optional)

disabled

Disable the module (optional)

Recent Improvements (v1.0.4)

Singleton Pattern Implemented

Prevents widget conflicts and duplicate loading. Auto-loading and manual control now work seamlessly together!

Plugin Reference Fix

Corrected TypeScript to JavaScript file references in plugins for better compatibility.

Nuxt 4.0+ Support

Full compatibility testing and support for the latest Nuxt 4.0+ features and build system.

Troubleshooting

Widget not appearing

Ensure the module is properly configured:

  • Check that @suggesto/nuxt is in the modules array
  • Verify your Board ID is correct
  • Make sure you're testing in a browser (widget is client-side only)
TypeScript errors

The module automatically registers TypeScript definitions. If you encounter issues:

Development vs Production

The widget works in both development and production. For environment-specific behavior, use runtime config or conditional plugins as shown in the examples above.

Migrating from Vue Integration?

If you were previously using the Vue integration method, the Nuxt module provides a much simpler setup. Remove any manual script loading and Vue components, then follow the installation steps above. The module handles everything automatically!

Nuxt.js Installation - Suggesto.io Documentation