Figma Support Forum

How can I put the component in the same component? (Cycle detected)

Hey, is there a way to put the component in the other instance of the same component? I’d like to use basic layout components across my design system so it’d be soooo useful.

If it’s not possible - is there a way to bypass it in a different way than building similar components with different name?

How do you imagine putting a component inside of itself? What would it do? This will create an infinite amount of components nested in each other, that’s why it’s not allowed. You can create a layout component and it’s ready to be used anywhere you want, why do you want to put it inside of itself?

For instance, I have a complex component called Card which I use across the system (both in web and mobile apps, with different properties of course). It has many variants, such as background colour. I’d like to use this component card with gray background in a Card with a white background just for not rebuilding the same component in a different way.

As you can see, I use overrides for injecting any content inside my card component.

Using nested instances like you are probably doing is the only way to achieve this. If you want to swap out the card contents in instances freely, there is an ongoing feature request for this: Fully Editable Component Instances