We raised €3M to grow your revenue on autopilot. Read the announcement
  • Sign in
  • Try for free

Docs

Quick startAPI referenceSupported languagesTracking eventsFramework examples

Framework examples

Copyable examples for opening demos and subscribing to SDK events from React and Vue.

The SDK is framework-agnostic: load embed.js as in the quick start and call window.handhold from your components.

React

import { useEffect, useCallback } from 'react';

const DemoButton = () => {
  const handleOpenDemo = useCallback(() => {
    if (typeof window.handhold?.openDemo === 'function') {
      window.handhold.openDemo({ id: 'agent-id', modality: 'VOICE' });
    }
  }, []);

  useEffect(() => {
    function handleEvent(data) {
      // Handle tracking event
    }

    window.handhold?.addEventListener('onusermessage', handleEvent);
    return () => {
      window.handhold?.removeEventListener('onusermessage', handleEvent);
    };
  }, []);

  return (
    <button className="demo-button" onClick={handleOpenDemo}>
      Start Demo
    </button>
  );
};

Vue

<template>
  <button class="demo-button" @click="handleOpenDemo">Start Demo</button>
</template>

<script>
  export default {
    name: 'DemoButton',
    methods: {
      handleOpenDemo() {
        if (typeof window.handhold?.openDemo === 'function') {
          window.handhold.openDemo({ id: 'agent-id', modality: 'VOICE' });
        }
      },
    },
    mounted() {
      this._handleEvent = (data) => {
        // Handle tracking event
      };
      window.handhold?.addEventListener('onusermessage', this._handleEvent);
    },
    beforeUnmount() {
      window.handhold?.removeEventListener('onusermessage', this._handleEvent);
    },
  };
</script>

For AI agents: a clean Markdown version is available at /docs/frameworks.md.

Handhold (“Handhold”) provides technology and AI-powered agents designed to help businesses engage visitors, qualify inbound leads, deliver personalized product experiences, and guide users through onboarding. Handhold is a software platform and does not provide sales, marketing, legal, or advisory services.

Any customer interactions, product information, or recommendations generated through Handhold agents are based on the configuration and data provided by the customer. Handhold does not control, verify, or guarantee the accuracy, completeness, or suitability of any information presented through its platform. By using this website or the Handhold platform, you acknowledge that all content is provided for informational and operational purposes only and agree to our Terms of Use and Privacy Policy.

Handhold

Sign inContact usCareers

Legal

Privacy policyCookie policyResponsible disclosure