This documentation is for Stitch.js (v3) SDK, which is now the recommended version for integrating Fasten Connect into your application. If you need access to the previous version, please see the v1 documentation.

This version includes a new API, compatibility with additional frontend frameworks (Next.js, React, Native, etc), improved performance, and additional features.

v3 also introduces a number of breaking changes. Please see v3/update-guide for more information.

The v1 Web Component is in maintenance mode and will no longer receive updates (outside of security fixes). Please update your code to use the new version.

Installation

stitch.js
<html>
<head>
    <link href="https://cdn.fastenhealth.com/connect/v3/fasten-stitch-element.css" rel="stylesheet">
    <script src="https://cdn.fastenhealth.com/connect/v3/fasten-stitch-element.js" type="module"></script>
</head>
<body>
    <!-- The fasten-stitch element has multiple options,
    see Web Component page for more information -->
    <fasten-stitch-element public-id="pub_live_123456324234234"></fasten-stitch-element>

    <script type="application/javascript">
        const el = document.querySelector('fasten-stitch-element');
        el.addEventListener('eventBus', (event) => console.log(JSON.parse(event.detail.data)));
    </script>
</body>
</html>