Tesouro’s Drop-in Components is a fully embeddable UI component library built upon JavaScript’s Web Components. It facilitates the integration of diverse UI elements into your web application. You can choose to bring in individual components or use the library as a single, comprehensive component serving as an all-in-one UI solution.
Drop-in components responsivenessAs of this release, the Tesouro Drop-in is optimized for desktop use and may not provide the desired responsiveness on mobile and tablet views. We are actively working to enhance support for these platforms in future updates.
You must provide the Tesouro Drop-in Components library as an NPM package, making it easier to load and use as a module. To use the Drop-in Components package, install the package using your preferred package manager as shown:
Copy
Ask AI
npm install @tesouro/sdk-drop-in
Next, import the package into your application as shown:
Drop-in credentialsThe Tesouro Drop-in library accepts only organization-user tokens as credentials within the fetchToken function. Attempting to use an app token with the library will throw an error. For more information about organization user tokens and permissions required, see Generate an organization user token and List of permissions.
If you already implemented a backend part that is capable of issuing organization user tokens, then write a function that retrieves this token.However, if you have not implemented the backend part yet but can already generate an organization and organization user token, you can also just call the POST /auth/token endpoint directly from this script, as shown below:
Tesouro does not recommend exposing the credentials of your fetchToken function on the client
side as shown earlier. For security reasons, we recommend that all Tesouro tokens are generated
from your server side code.
You have now learned about the Tesouro Drop-in component library. For a detailed quickstart guide with detailed usage examples, see Drop-in quick start.