I was wondering is it possible to import and reuse components from retools component library in my own custom component?
Ooh, that’s a great question. I don’t think this is easily possible, but I know a few users have used CSS to make HTML elements look more like Retool components
What is your use case here? Curious if there’s a workaround!
Thanks for the reply.
Basically I just want to keep the UI consistent, the same as Retool.
Makes sense! We're getting closer I think.
There must be an easier way, but so far, this is what I've been able to hack together.
You can use your browser's inspector to inspect an element (e.g. a button) and copy its styles.
Then, you can paste those styles into a
<style> tag in your custom component.
I had to tweak it a bit (namely,
text-align: center instead of inherit), but my custom component button is starting to look more and more like a Retool component!
See attached app JSON if you want to poke around with my setup! You can import this JSON file by clicking Create new (home page) > From JSON. Quick docs on exporting/importing apps here.
Excellent, thank you. I'll give this a try!
Of course! Let me know how it goes