Partner Install Example

Demonstrates integrating the widget via a built script tag

Installation

Partners can install the widget and build a self-contained script file:

1. Install

# From git URL
npm install github:username/intestacy-calculator

# Or from a local tarball
npm pack  # creates intestacy-calculator-1.0.0.tgz
npm install ./intestacy-calculator-1.0.0.tgz

2. Build

npm run build
# Output: dist/intestacy-widget.min.js

3. Embed

<!-- Add this where you want the calculator -->
<div id="intestacy-calculator"></div>

<!-- Include the built script -->
<script src="intestacy-widget.min.js"></script>
<script>
  new IntestacyWidget({
    container: '#intestacy-calculator',
    theme: 'none',
    contactInfo: 'Contact us to discuss creating a Will.'
  });
</script>

Setting theme: 'none' lets your site's CSS control the widget's appearance. Use theme: 'light' or theme: 'dark' for the built-in themes.