Overview
Tesouro’s embedded components are available as framework-agnostic web components loaded via a CDN script. Drop them into any HTML page — no build step or framework required.1. Load the script
Add the following script tag to the<head> of your web application:
2. Set up a widget token endpoint
Embedded components authenticate users via short-lived, user-scoped widget tokens. Your backend exposes an endpoint that accepts{ userId, userEmail } and returns { widgetToken }.
See the React guide for a full server-side implementation example.
3. Place a component
Drop the component element anywhere in your HTML. Passdata-widget-token-refresh-url to point components at your token endpoint:
Customization
All components support the followingdata-* attributes for theming:
You can apply these globally using
setWidgetDefaults to avoid repeating them on every element. Inline data-* attributes on an individual component take precedence over values set via setWidgetDefaults: