The API for JavaScript comes with many out of the box widgets that you can drop into your application to add extra functionality without having to code it yourself.
User interface widgets all live in the esri/dijit namespace and include widgets for selecting basemaps, bookmarking map locations, printing maps, geocoding, measuring, adding legends, scalebars, overview maps and other map elements, and many, many more.
Widgets differ from the toolbars we have seen so far in this chapter, because they require less work from you, the developer. This is because, unlike toolbars, they provide not just the functionality, but the user interface as well.
For a full list of widgets, consult the ArcGIS API for JavaScript documentation at: https://developers.arcgis.com/javascript/3/jshelp/.