Basic usage
Initialize the SDK
Load the Squire SDK from the CDN and create a
Squire instance with your access token. See Authentication for how to obtain a token.Mount the widget
Call
mountWidget with the container selector and the widget name 'microphone-quality-test'. Pass an optional configuration object as the third argument to customize behavior and appearance.Configuration options
Pass a configuration object as the third argument tomountWidget to customize the widget.
Language code for the widget interface. Supported values:
'en' (English), 'nl' (Dutch), 'fr' (French), 'de' (German).When omitted, the widget uses the outputLanguage set during SDK initialization.Label of the microphone device to preselect. When provided, the widget skips its built-in microphone selection UI and uses the specified device directly.
Theme configuration object for customizing the widget’s visual appearance.
| Property | Type | Default | Description |
|---|---|---|---|
colorPrimary | string | '#539DD6' | Primary color for buttons and accents. |
colorDark | string | '#0C2639' | Dark color for text and borders. |
colorLight | string | '#7CC1F6' | Light accent color for hover states. |
colorLightest | string | '#E1F1FD' | Lightest color for backgrounds. |
borderRadius | string | '0.5rem' | Border radius for UI elements. |
font | string | 'system-ui, sans-serif' | Font family. All Google Fonts are supported and loaded automatically. |
Events
Listen for events using theon method on the widget instance.
Emitted when the widget has fully loaded and is ready for user interaction.
Complete example
The following example shows a full HTML page embedding the Microphone Quality Test Widget.index.html