``` class CustomComponentWrapper() : CustomCompone...
# gui
n
Copy code
class CustomComponentWrapper() : CustomComponent() {
    override public fun setCompositionRoot(compositionRoot: Component) {
        super.setCompositionRoot(compositionRoot)
    }
}

fun customComponent(init: CustomComponentWrapper.() -> Unit = {}) = CustomComponentWrapper().apply(init)
with that, you can add a customcomponent like that:
Copy code
customComponent {
    textField()
}