How to nest custom components inside each other in Retool?

Has anyone found a way to nest a custom component inside another in Retool? Is this currently possible, or are there any workarounds?
I’ve checked the Retool forum and it seems that it isn’t supported, but perhaps someone has found a creative method. Any advice or examples would be greatly appreciated!

Thanks in advance!

Hi @Miguel_Gonzalez_Herrera,

What is the use case you are looking to achieve?

When you are building a custom component, this is essentially a React app that run inside an iframe. Which can contain other React components inside of a parent component.

If you create and save a custom component in Retool, you cannot place it via the app building canvas inside of another custom component. Since each custom component is sandboxed.

Sorry for the delay in getting back to you.

After considering the options, I decided to follow your suggestion and import one custom component inside another at the React code level. This approach allows me to maintain proper component structure while respecting the iframe sandboxing in Retool. It works well for my use case and keeps the components modular and reusable.

Thanks again for your guidance!

1 Like

No problem, glad it worked for you!