Widget manifest

Each ArcGIS Web AppBuilder widget has a manifest.json file, which describes a widget's attributes and properties as shown in the following tables. Most of the attributes and properties have default values, and you can modify them as needed. The following is the manifest.json file from the demo widget.

{
  "name": "Demo",
  "platform": "HTML",
  "version": "2.11",
  "wabVersion": "2.11",
  "author": "Esri R&D Center Beijing",
  "description": "This is the widget used in developer guide",
  "copyright": "Copyright © 2018 Esri. All Rights Reserved.",
  "license": "http://www.apache.org/licenses/LICENSE-2.0
}

Widget attributes

AttributeTypeDescriptionRequiredDefault

name

String

The name identifies the widget. The name should be the same as the folder name under the widgets folder.

Y

No default value

2D

Boolean

Determines if the widget supports 2D.

N

True

3D

Boolean

Determines if the widget supports 3D.

N

False

platform

String

Should be HTML for 2D widgets and HTML3D for 3D widgets.

Y

No default value

version

String

The widget version number.

Y

No default value

author

String

The widget author.

N

No default value

description

String

The widget description.

N

No default value

copyright

String

The widget copyright.

N

No default value

license

String

The widget license.

N

No default value

wabVersion

String

The Web AppBuilder framework version that the widget depends on. You can open the developer tool of the browser and type wabVersion in the console to get the version number.

Y

No default value

properties

Object

See the properties table below.

N

No default value

featureActions

Array

The feature actions that the widget contains (a 3D widget does not support this feature). The element in the array has the following format:

{
    "name": "feature action name",
    "uri": "feature action URI relative to widget folder"
  }

N

No default value

Widget properties

PropertyTypeDescriptionRequiredDefault

inPanel

Boolean

The widget displays in a panel by default. You can change this behavior. If it's not in a panel, the widget displays directly.

No

True

hasLocale

Boolean

If the widget has i18n string files (nls/strings.js), this property should be set to true. The framework loads the i18n files by convention. If it's false, the widget i18n files will not be loaded.

No

True

hasStyle

Boolean

If the widget has a style file (css/style.css), this property should be set to true. The framework loads the style file by convention. If it's false, the widget style file will not be loaded.

No

True

hasConfig

Boolean

If the widget is configurable, this property should be set to true. The framework loads the configuration file by convention. If it's false, the widget configuration file will not be loaded.

No

True

hasUIFile

Boolean

If the widget has a template UI file (Widget.html), this property should be set to true. The framework loads the UI file by convention. If it's false, the widget UI file will not be loaded.

No

True

hasSettingPage

Boolean

If the widget has a setting page file (setting/Setting.js), this property should be set to true. The builder loads the setting page when you add or edit a widget. If it's false and the widget is configurable, the builder will show a JSON editor to let users configure the widget.

No

True

hasSettingUIFile

Boolean

Whether a widget has a setting UI file (setting/Setting.html).

No

True

hasSettingLocale

Boolean

Whether the widget setting page supports i18n (setting/nls/strings.js).

No

True

hasSettingStyle

Boolean

Whether the widget setting page has a style file (setting/css/style.css).

No

True

isController

Boolean

If the widget is a controller widget, set this property to true. See Create a controller widget.

No

False

keepConfigAfterMapSwitched

Boolean

This property is used in the builder. If false, the builder will clear the widget’s configuration data after the map is changed.

No

True

hasVersionManager

Boolean

Whether the widget has VersionManager.js. See Make widgets backward compatible.

No

False

supportMultiInstance

Boolean

Whether users can add more than one instance of the same widget in the app. The following out-of-the-box widgets don’t support multiple instances.

2D widgets:

  • Analysis
  • Attribute Table
  • Basemap Gallery
  • Coordinate
  • Edit
  • Extent Navigate
  • Full Screen
  • Group Filter
  • GeoLookup
  • Home Button
  • Image Measurement
  • Incident Analysis
  • My Location
  • Oblique Viewer
  • Overview Map
  • Scale Bar
  • Situation Awareness
  • Select
  • Smart Editor
  • Splash
  • Swipe
  • Time Slider
  • Visibility
  • Zoom Slider

3D widgets:

  • Compass
  • Coordinate
  • Full Screen
  • Home
  • My Location
  • Navigate
  • Slides
  • Splash
  • Zoom Slider

No

True

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.