ribaunt-widget as a custom element in your Vite config, import the widget as a side effect inside your component, and use it directly in your template with Vue’s standard : property binding and @ event listener syntax.
The widget relies on the Web Crypto API and therefore requires a secure context. Use
https:// in production and http://localhost during local development. Plain local-network HTTP URLs may fail in some browsers.Vite configuration
Tell Vue’s template compiler to treat any tag starting withribaunt- as a custom element. Without this step Vue will emit “Unknown custom element” warnings at runtime.
Using the widget in a component
Importribaunt/widget as a side effect to register the custom element, then use <ribaunt-widget> directly in your <template>. Bind reactive data with : and attach event handlers with @.
The recommended challenge endpoint response shape is
{ challenges: string[] }. For backward compatibility the widget also accepts { tokens: string[] } and a raw string[].When you bind
:disabled="isDisabled", the widget treats the disabled state as a full interaction lock. Clicks, keyboard activation, startVerification(), and auto-verify are all blocked until you clear the prop. Set isDisabled.value = false before expecting the widget to run.