Idukki
Skip to content
Developers + API

Embed on Hydrogen, Next.js, Astro and Remix

Per-framework patterns for dropping in the widget without breaking SSR or hydration on a headless storefront.

5 min read · last updated 2026-05
On this page

On a headless storefront the widget is the same single script, but where you mount it matters so you don’t fight SSR or hydration. The pattern is consistent: render a placeholder, load the script lazily, keep it in a leaf component.

Next.js (App Router)

import Script from "next/script"

export function IdukkiGallery({ id }: { id: string }) {
  return (
    <div data-idukki-collection={id}>
      <Script src="https://cdn.idukki.io/widget.js" strategy="lazyOnload" />
    </div>
  )
}

Hydrogen, Astro and Remix

Use the same approach: place the placeholder div and the script in a leaf component, and load the script after hydration. In Hydrogen, a client-only wrapper avoids an SSR mismatch; in Astro, a client directive on the island does the same; in Remix, mount it in a component that only runs on the client.

Was this page helpful?

Still stuck?

Email us at support@idukki.io or open the in-app chat. We answer within one working day.

Talk to a human

Related guides

4-min setupDTC + B2B brands37 KB runtimeReal G2 reviews

Stuck?

A real human is faster than a search box.

In-app chat replies under 5 minutes during EU + US business hours. Status of a ticket? Email support@idukki.io and we’ll surface it.

  • No credit card
  • Cancel anytime
  • SOC 2 + GDPR

Where Idukki ships

Same data model. Every surface a shopper meets.

We use cookies

We use essential cookies to run this site and optional analytics cookies to understand how it’s used. You can change your choice anytime in our privacy policy.

Embed on Hydrogen, Next.js, Astro and Remix. Help — Idukki