What you need
Every embed needs two values:
Both values live on your account. See Account Settings to find them.
Wherever you see
assistant-id (HTML attribute) or assistantId (JavaScript prop), pass the ID of the Study you want participants to take. The two terms are interchangeable in this widget.Quickstart
1
Grab your keys
Copy your public key and the Study ID from Account Settings.
2
Install or include the widget
Run
npm install @userintuition-ai/web for React, or drop in the UMD <script> tag for plain HTML.3
Mount it
Add the
<userintuition-widget> element (or <UserIntuitionWidget /> component) with public-key and assistant-id.4
Style and scope
Set
theme, position, size, and brand colors. Use show-based-on-url and delay-interval so the widget only appears where it should.5
Test the interview
Open the page, trigger the widget, and complete a test interview. The response will appear in your Study Dashboard alongside link and invite responses.
Install
The package is published as@userintuition-ai/web.
Embedding methods
There are four ways to mount the widget. Pick the one that matches your stack.1. HTML custom element
The simplest option. Drop in the script tag and a<userintuition-widget> element anywhere in your HTML.
2. JavaScript loader
If you need to mount programmatically (for example, after a route change or user action), useWidgetLoader.
3. React component
For React apps, install the npm package and import the component.4. Web component variant
For React apps that prefer a thin wrapper around the underlying custom element, useUserIntuitionWidgetWebComponent. It is the package’s default export and the recommended React surface.
Modes
The widget supports three interview modes. Set the mode that fits your audience and the depth of feedback you want.Position and size
Control where the widget anchors and how much room it takes up on screen.Position
Size
Theme and branding
The widget ships withlight and dark presets. You can override individual colors to match your brand.
title, cta-title, cta-subtitle, start-button-text, end-button-text, and mode-specific empty-state messages (voice-empty-message, chat-empty-message, chat-placeholder, hybrid-empty-message, and others).
Consent flow
Whenconsent-required is enabled, the widget shows a consent dialog before the interview can start. The participant’s choice is stored in localStorage so they only see the dialog once per device.
Consent state is keyed by
consent-storage-key. If you change the key, the widget will treat returning participants as new and prompt them again.Smart display
You usually don’t want the widget to appear on every page or fire instantly. Use these props to scope when and where it shows.Voice and reconnect options
Voice mode has a few extra knobs for transcript display and reconnection.Where to find your keys
Bothpublic-key and assistant-id come from your User Intuition account.
Public key
Find this in your account settings under API keys. Safe to ship in client-side code.
Study ID
Each Study has its own ID. Pass it as
assistant-id (or assistantId in React).Browser support
The widget runs in any modern browser that supports:- ES6+
- The Custom Elements API
- Microphone access (for voice and hybrid modes)
Next.js and React Server Components
The widget is a client-only component — it toucheswindow, localStorage, and the microphone. In Next.js 13+ with the App Router, mark the file as a client component.
Next steps
Share a study link
The simpler alternative — a hosted URL anyone can open in a browser.
Account settings
Find your public key and Study IDs.

