Good implementation. I'm beginning to think that building these things are sort of a rite of passage.
https://github.com/hmlongco/Builder
In Builder I used RxSwift to implement two-way notifications and data bindings, something that' seems to be missing from the TextField implementation shown here.
The next challenge for you would be implement ViewBuilder for StackView and figuring out how to make subviews first class citizens.
That's why in Builder I started using structs for view definitions (similar to SwiftUI). They're more flexible and none of the modifier additions end up polluting the standard UIKit interface.
I've used Builder in a few projects, but the real problem lies in the fact that SwiftUI is maturing to a point that makes doing programatic UIKit somewhat questionable,..