require(["esri/support/actions/ActionButton"], function(ActionButton) { /* code goes here */ });
Class: esri/support/actions/ActionButton
Since: ArcGIS API for JavaScript 4.8

Actions used in Popup and LayerList.

See also:

Constructors

new ActionButton(properties)
Parameter:
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Property Overview

Any properties can be set, retrieved or listened to. See the Working with Properties topic.
NameTypeSummaryClass
Boolean

Indicates whether the action is currently active.

more details
more detailsActionButton
String

Adds a CSS class to the action's node.

more details
more detailsActionButton
Boolean

Indicates whether this action is disabled.

more details
more detailsActionButton
String

The name of the ID assigned to this action.

more details
more detailsActionButton
String

The URL to an image that will be used to represent the action.

more details
more detailsActionButton
String

The title of the action.

more details
more detailsActionButton
String

Specifies the type of action.

more details
more detailsActionButton
Boolean

Indicates if the action is visible.

more details
more detailsActionButton

Property Details

activeBoolean

Indicates whether the action is currently active.

Default Value:false
classNameString

Adds a CSS class to the action's node. Can be used in conjunction with the image property or by itself. Any icon font may be used in this property. The Esri Icon Font is automatically made available via the ArcGIS API for JavaScript for you to use in styling custom actions. To use one of these provided icon fonts, you must prefix the class name with esri-. For example, the default zoom-to action in Popup uses the font esri-icon-zoom-in-magnifying-glass.

disabledBoolean

Indicates whether this action is disabled.

Default Value:false

The name of the ID assigned to this action. This is used for differentiating actions when listening to the trigger-action event.

imageString

The URL to an image that will be used to represent the action. This property will be used as a background image for the node. It may be used in conjunction with the className property or by itself. If neither image nor className are specified, a default icon default icon will display.

titleString

The title of the action.

For popups: When there are fewer than three actions defined in a popup, this text is displayed to the right of the icon or image representing the action. If there are three or more actions in the popup, then this text is used as a tooltip on the action.

For LayerList: The first action is displayed in the layerlist with an icon. The layerlist has a menu that will display all actions with their titles

typeString

Specifies the type of action. Choose between "button" or "toggle". Currently, these two are the only supported types. A "slider" type will follow-up in a future release.

Default Value:null
visibleBoolean

Indicates if the action is visible.

Default Value:true

Method Overview

NameReturn TypeSummaryClass
ActionButton

Creates a deep clone of this object.

more details
more detailsActionButton

Method Details

clone(){ActionButton}

Creates a deep clone of this object.

Returns:
TypeDescription
ActionButtonA clone of the new ActionButton instance.

API Reference search results

NameTypeModule
Loading...