Hi guys, I’m trying to implement components from React (specially from the library “Tremor” (Tremor • Docs)) to make my Anvil web app look sexy.
For what I have searched, it is possible to integrate React, but I don’t find how can I import the library and convert the code in Python, as described in the previous forum discussion (React-swipeable-list component)
Any one that has implemented JS components into a Anvil app?
Anvil | Login
share a copy of your app
The ability to do this largely depends on the library authors supporting a build that works in the web without having to build it locally.
Unfortunately the tremor library doesn’t appear to have such an option and so the technique being referred isn’t possible. (There’s no supported CDN for tremor I can find).
With a library like this that requires a build step we get into the pain of JavaScript build tools, which are numerous. If you’re not very experienced in this area then it’s a rabbit hole I wouldn’t recommend. I wouldn’t recommend it for those with experience.
We are aware of the desire for use cases like this and we have plans. So I guess watch this space.
4 Likes
I have experience. None of it is good. Also wouldn’t recommend.
6 Likes
We went around this issue by rebuilding the tailwind ui components with custom python accessible css classes.
Basically if you just want the looks then you can proboably rebuild those components with standard python components and some css code.
2 Likes