Help for external Library

Hi All, I am new to Retool and I need a support for adding external library through settings>Libraries

example
https://cdn.jsdelivr.net/npm/danfojs@1.1.2/lib/bundle.min.js
or
https://cdn.jsdelivr.net/npm/frappe-gantt@0.5.0/dist/frappe-gantt.min.js

Simply I am adding the link of the library to the libraries list but I cannot call them in a query. Am I missing something steps

Thank you very much in advance for your support.

Preload custom JavaScript code and libraries

Hi @Bill

The mentioned libraries affect the DOM, i.e. add something to the body of the webpage.

The Retool implementation for the external libraries are compatible only with those that work with data and computing.

In order to add custom visible elements (i.e. a Gantt interface or a data-frame table), you need to rely on Custom Components.

Hope this help.

2 Likes

Hi Fabio,

Thank you very much for your quick clear response. I want to add custom components but seems like there is no straight forward method.

Is there any simple method to add it? Or should I create with RestApi

I know, the current way to add custom component require a bit of setup.

There's a quicker way though, that is the "legacy" version, but still very good IMHO, that allows you to add webapp code to create your own component. Just drag the Custom Component component you find in the component list and add the code (HTML/CSS/JS).

Here the doc to learn how to make the component communicate with Retool:

Hope this help

1 Like

There is no dummy custom component under component library that I can manipulate according to my needs. And the explained method under legacy (what I understood) is for local hosted. And there is no clear instruction anywhere how I can build my custom component on my retool cloud hosted environment

Hi @Bill,

We recommend the new custom component option over the now deprecated (legacy) custom component, if possible!

However, you can still use the deprecated custom component on Cloud or self hosted by following these steps:

  1. Settings -> Advanced Beta (as an admin). Search for deprecated and toggle on:

  2. Drag and drop the custom component in any app:
    CleanShot 2024-11-06 at 17.09.03@2x

1 Like

Hi @Tess,

Thank you for the information. I didn't it but the app was on another tab open and I didn't refresh that tab seems like that was the cause of the issue. Now I can see the custom component. Thank you very much for your support

1 Like