Website QA

Customising

Colours, fonts, where the button sits, your own trigger, and the JavaScript API.

The widget renders in a shadow DOM, so your site's CSS cannot reach into it and break it — and it cannot leak out and break your site. Everything you can change is a named custom property or a data- attribute.

Where the button sits

<script async src="https://your-app/w.js"
  data-wq-key="wq_…"
  data-wq-position="bottom-left"></script>

bottom-right (default), bottom-left, top-right, top-left, or none to hide the floating button entirely.

Using your own button

<script async src="https://your-app/w.js"
  data-wq-key="wq_…"
  data-wq-trigger="#report-a-bug"></script>

Any CSS selector. Clicking anything that matches opens the report — including elements added to the page later, because the listener is delegated. Setting a trigger hides the floating button unless you also set data-wq-position.

An invalid selector is ignored rather than thrown: a typo in your snippet must never break the host page.

Theming

Every colour, font and radius is a --wq-* custom property. Three ways to set them, in the order they win:

Defaults

Shipped on :host inside the shadow root. Do nothing and you get these.

Your stylesheet

Custom properties inherit through the shadow boundary, so your own CSS can restyle the widget from outside:

[data-wq-root] {
  --wq-accent: #c98546;
  --wq-font: Inter, sans-serif;
  --wq-radius: 4px;
}

Script tag attributes

These beat both, useful when you cannot add CSS:

<script async src="https://your-app/w.js"
  data-wq-key="wq_…"
  data-wq-accent="#c98546"
  data-wq-accent-fg="#fff"
  data-wq-font="Inter, sans-serif"></script>

Tokens with a script-tag attribute

PropertyAttributeDefaultWhat it colours
--wq-accentdata-wq-accent#111Button, primary actions, the closing bar
--wq-accent-fgdata-wq-accent-fg#fffText on the accent
--wq-timerdata-wq-timerthe accentThe bar that counts down on the confirmation
--wq-fontdata-wq-fontsystem-uiEverything
--wq-radiusdata-wq-radius8pxInputs, buttons
--wq-bgdata-wq-bg#fffPanel background
--wq-fgdata-wq-fg#111Panel text

Tokens you set from CSS only

PropertyDefaultWhat it colours
--wq-muted#666Secondary text
--wq-faint#888"(optional)" labels
--wq-border#d4d4d4Input and card borders
--wq-surface#fafafaThumbnails, the drop zone
--wq-surface-strong#f2f2f2The context summary block
--wq-focus#2563ebFocus rings, the element highlight
--wq-danger#b91c1cError messages
--wq-radius-lg14pxThe panel itself
--wq-shadow0 12px 40px rgba(0,0,0,.28)The panel's shadow

Dark sites

There is no dark mode setting, deliberately. A dark site sets two properties:

[data-wq-root] {
  --wq-bg: #16161a;
  --wq-fg: #f4f4f5;
  --wq-surface: #1f1f24;
  --wq-surface-strong: #26262c;
  --wq-border: #33333a;
}

The JavaScript API

For anything the attributes do not cover:

window.websiteQA.open();          // open the report form
window.websiteQA.selectElement(); // start the element picker directly

Both are available as soon as w.js has run. If you call them from a script that might run first, guard with window.websiteQA?.open().

Confirmation and auto-close

After a report sends, the confirmation closes itself after six seconds, with a bar across the top of the panel draining to show it coming. Hovering the panel pauses it, and clicking anything inside cancels it — following the status link should never close the thing you opened it from.

On this page