Insurance Widget v0.0.1

Embeddable insurance quote widget for partner websites.

Quick Start

Load the script, place the widget tag, and use .open() / .close():

<!-- Load the widget -->
<script src="https://insurancehub-widget.gotosoft.net/widget.js"></script>

<!-- Widget tag (always in the DOM, hidden by default; set the flow attribute) -->
<insurance-widget id="my-widget" flow="BBI-SR22"></insurance-widget>

<!-- Open from your own button -->
<button onclick="document.getElementById('my-widget').open()">
  Get a Quote
</button>

<!-- Listen for close -->
<script>
  document.getElementById('my-widget')
    .addEventListener('close', () => console.log('closed'));
</script>

API

Method / AttributeDescription
.open()Opens the modal
.close()Closes the modal, dispatches close event
flow attributeFlow slug — selects which insurance flow renders. Required. e.g. "BBI-SR22".
close eventFired when modal closes (backdrop click, X button, or .close())

Live Demo

Click to toggle the widget: