Installation
JavaScript
You can include our bundled javascript package from the jsDelivr CDN:
<script src="https://cdn.jsdelivr.net/npm/@vertical-insure/embedded-offer"></script>You can also install our package from npm:
npm install @vertical-insure/embedded-offerReact
You can install our react package from npm:
npm install @vertical-insure/embedded-offer-reactNext.js
The drop-in component uses browser APIs (such as window), so it can't be rendered on the server. In the Next.js App Router, load it
from a Client Component with next/dynamic and server-side rendering turned off:
"use client";
import dynamic from "next/dynamic";
const VerticalInsure = dynamic(() => import("@vertical-insure/embedded-offer-react"), {
ssr: false,
});
export default function Offer() {
return (
<VerticalInsure
config={{
client_id: "test_********************************",
product_config: {
// ... your product config
},
}}
/>
);
}ssr: false is only allowed inside a Client Component (a file starting with "use client"). You can render Offer from any Server Component page.
Vue JS
You can install our vue package from npm:
npm install @vertical-insure/embedded-offer-vue