Install npm libraries

Hey @omerz8 and @DaVla!

As awesome as it would be to import any npm package directly into Retool it unfortunately isn't possible at the moment. As mentioned in our docs (here) you need to import a UMD build in order for it to work. Particularly, the file you're importing can't have any require statements. That doc also covers exactly how you can import libraries though so it's definitely worth a look!

That being said, if you're open to doing a bit of extra work there is an interesting guide here on how you can develop and publish your own custom component for use within your Retool app. I'm not familiar with Apryse but, taking a quick look at it, that might be your best bet. If you're interested in reading more about how to work with custom components in your app you can read these docs.

As for CSS - @Isaac-H made a fantastic post on how to use custom CSS in Retool here. We typically don't recommend it as a long-term solution though as component classes aren't guaranteed to be consistent between versions and there currently isn't a way to add custom classes to components. You can check out other options for styling your apps in these docs, the dev team is constantly looking to expand them!

Let me know if that raises any further questions :slightly_smiling_face: I'm also curious to hear more about your use case!

1 Like