Installation

JavaScript

npm version

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-offer

React

npm version

You can install our react package from npm:

npm install @vertical-insure/embedded-offer-react

Next.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:

app/components/Offer.tsx
"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

npm version

You can install our vue package from npm:

npm install @vertical-insure/embedded-offer-vue

On this page