Skip to main content
The widget is one hosted script. Drop it into your app and it loads, renders the duck button, and handles the rest — nothing to bundle, install from npm, or add to a build step. Building a mobile app? See the React Native and iOS (Swift) tabs under Framework snippets.

Add the script tag

Paste this before the closing </body> tag, on every page where you want feedback (most teams add it everywhere):
The widget initializes itself as soon as it loads — no startup call needed.
AttributeRequiredDescription
srcyesThe hosted widget: https://tryproduck.com/sdk/v1.js. Load it from this URL so you always get updates.
data-projectyesYour project’s API key from the dashboard. Starts with pk_live_.
data-launcheroptionaldroplet (default) or none to suppress the built-in button. See Bring your own UI.
data-confirmationoptionaltoast (default) or none to suppress the built-in confirmation.
data-draggableoptionalon to let users drag the launcher anywhere on screen. Off by default.
deferrecommendedLoads the widget without blocking your page render.

Framework snippets

Use the Script component in your root layout so the widget loads on every route:
app/layout.tsx

Set up with an AI agent

Using Cursor, Claude Code, Copilot, or another coding agent? Copy the prompt for your framework, replace pk_live_YOUR_KEY with your project’s API key, and paste it into the agent. Each prompt carries everything the agent needs — file locations, exact code, and verification steps.

Opening the widget

Once the script is on the page, your users get two ways in:
  • The duck button — floating in the bottom-right corner.
  • Keyboard shortcut⌘ + Shift + Z (Mac) or Ctrl + Shift + Z (Windows/Linux).
Want to open it from your own button instead? See the JavaScript API.
The widget renders inside an isolated shadow root, so its styles never leak into your app and your CSS never touches the widget. No class-name collisions to worry about.