Hi,
Here is the learning path on getting started creating custom widgets
https://gettingstarted.mendixcloud.com/link/path/45
You can also check out the boiler plate widget for a good example.
https://github.com/mendix/AppStoreWidgetBoilerplate