Is it possible to create recursive components

Hello i need to implement the same functionality, did you find any solution?