There are some UI elements you cannot generalize, yes. But there are definitely some that you can. There is no reason you cannot have an abstract text input control with different native widget implements. wxWidgets has been doing it successfully for decades now.
Plenty of other opportunities to reuse code, this is not one of them.