Install the TidySupport chat widget in your Next.js app in under 5 minutes using the npm package.
Add the TidySupport widget package to your Next.js project.
npm install @tidysupport/widgetImport the widget and add it to your root layout file so it appears on every page.
import TidySupportWidget from "@tidysupport/widget";
export default function RootLayout({ children }) {
return (
<html>
<body>
{children}
<TidySupportWidget workspaceId="YOUR_WORKSPACE_ID" />
</body>
</html>
);
}Replace YOUR_WORKSPACE_ID with your workspace ID from Settings → Widget in your TidySupport dashboard.
Visit your site. You should see the chat bubble in the bottom-right corner of the page. Click it to confirm the widget opens correctly.
The widget loads asynchronously and shows a launcher button in the corner of your site. Customers click it to start a chat with your team. All conversations are routed to your TidySupport inbox.
Next article
How to identify users with the Events API