Embedding Fuse in your website is simple. There are two steps:

  1. Add the fuse-importer NPM package to your application.
  2. Add a small JavaScript snippet to open your Fuse importer.

Adding the NPM Package

To add Fuse, do:

yarn add fuse-importer

To import it for use:

import FuseImporter from "fuse-importer";

Launching an Importer

The show function does exactly what it sounds like; it displays the importer. Ensure you have initialized the importer properly beforehand. Use this function like so:

import FuseImporter, { getFuseClientSideToken } from 'fuse-importer';

// Initialize the importer
const importer = new FuseImporter();

// See https://fuse-docs.flatirons.com/getting-started/sessions
importer.getSessionToken = getFuseClientSideToken({
  importer_slug: 'YOUR_IMPORTER_SLUG',
  api_key: 'YOUR_API_KEY'
});

importer.show();