In progress
To create custom widgets and themes for ArcGIS Enterprise you will need to install Web AppBuilder (Developer Edition).
https://developers.arcgis.com/web-appbuilder/guide/getstarted.htm
https://developers.arcgis.com/web-appbuilder/guide/build-your-first-app.htm
https://developers.arcgis.com/web-appbuilder/guide/get-started.htm
Tips
Getting started
When running Web AppBuilder, use your lower case machine name or FQDN instead of localhost or an IP address
Ensure CORS settings are clear in the target ArcGIS Enterprise, or that your machine name/FQDN above is white listed
Organization → Edit Settings → Security → Allow Origins
Editing Widgets
https://gis.stackexchange.com/questions/246253/refreshing-web-appbuilder-widget-during-development
Publishing
First, you cannot publish custom widgets back to the WAB built into Enterprise/Portal, as per this: https://community.esri.com/thread/121410
You can publish apps which use custom widgets and themes by following these steps: