Modify Switch Widget

I want to modify the switch widget. I checked the source code and the modifications should be easy. However I have no clue how to get a “copy” of the switch widget as no json file exists and it cannot be exported. Where to start?

A template can be adapted to whatever you want:

Except that the “integrated” widgets are quite different from custom widgets… I read this and it is only of partial help!