Widget demo: a mock contractor website with deliberately hostile CSS, embedding the widget with one script tag.

← Back to dashboard
Example Roofing & Exteriors

Your roof, done right.

Family owned since 1998. Licensed & insured, with free inspections across the metro area.

  • Shingle, metal & flat roof replacement
  • Seamless gutters and downspouts
  • Storm damage repair and insurance claims

★★★★★ 4.9 from 300+ local homeowners

What this page throws at the widget

The site above uses CSS that breaks most embeddable widgets. The quote form ignores all of it, because it renders inside a Shadow DOM and only reads its own branding.

Serif body text
Georgia at 19px with a 1.9 line-height, inherited by everything inside.
An all-caps widget area
Uppercase, centered, italic, letter-spaced, 2.4 line-height, right where the widget sits.
!important form controls
Every button, input, select and label is forced orange with square 22px borders, like the Call button.
content-box everywhere
Every element is forced to content-box sizing, and every div gets extra padding.
A 62.5% root font-size
The classic theme trick that shrinks every rem-based widget.
A fake --qf-primary
The host sets the widget's own color variable to lime.

Embed on any website

Paste this into WordPress, Squarespace, Wix (Custom HTML block) or plain HTML, wherever the widget should appear.

<div data-quick-fig="demo"></div>
<script src="https://quickfig.app/widget.js" async></script>

Or as a single tag, inserted right where the script is:

<script src="https://quickfig.app/widget.js" data-contractor="demo" async></script>

How it works

  • widget.js is one self-contained file. It finds every [data-quick-fig] element and mounts the widget into a Shadow DOM.
  • Branding and pricing rules load from /api/widget/demo, so dashboard edits go live without changing the embed code.
  • Estimates are calculated instantly in the browser, then recalculated on the server when a lead is submitted, so a tampered client can't change the stored price.
  • Single-page apps can call window.QuickFig.mount(el, slug) / unmount(el) directly.