UK Intestacy Calculator Example

Simple script tag integration example

About This Calculator

This calculator helps you understand how your estate would be distributed if you die without a will in the UK. It uses the current intestacy rules to determine who would inherit your assets.

This example demonstrates how to include the calculator using a simple import approach, which is ideal for websites where you have ES module support.

Code:


<script type="module">
  import IntestacyWidget from '../src/integration/IntestacyWidget.js';
  
  document.addEventListener('DOMContentLoaded', function() {
    var widget = new IntestacyWidget({
      container: '#intestacy-calculator',
      theme: 'light',
      contactInfo: 'Please contact us on 0161 348 7581 to discuss creating a Will.'
    });
  });
</script>