Skip to main content

React Component

Wrap the embed script in a React component for easy integration:

Usage

Next.js

For Next.js, use the component with "use client" directive since it uses browser APIs:
The embed script is loaded client-side only. No SSR issues — the widget mounts after hydration.

Remix / React Router

Works the same way in Remix or React Router:

Dynamic Updates

To update the widget after mount, keep a ref to the global HypermidWidget: