Types
import type { ComponentName, Options, ComponentOptions, MoveOptions, MoveComponentOptions } from "@arcgis/core/views/ui/types.js";

Type definitions

ComponentName

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Type
"compass" | "navigation-toggle" | "zoom"

Options

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

position

Property
Type
UIPosition | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The destination position. The component will be placed in the UI UI.container when not provided. If not specified, manual is used by default. Using manual allows you to place the component in a container where you can position it anywhere using css. For the other possible values, "top", "bottom", "left", and "right" are consistent placements. The "leading" and "trailing" values depend on whether the browser is using right-to-left (RTL) or left-to-right (LTR). For LTR, "leading" is left and "trailing" is right. For RTL, "leading" is right and "trailing" is left.

index

Property
Type
number | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The placement index of the component(s). This index shows where to place the component relative to other components. For example a value of 0 would place it topmost when position is top-*, leftmost for bottom-left and right most for bottom-right.

ComponentOptions

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Supertypes
Options

component

Property
Type
ComponentCompatible
Since
ArcGIS Maps SDK for JavaScript 5.0

The component to move/add to the UI. This can be a widget instance, HTML element, a string value representing a DOM node ID.

MoveOptions

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Supertypes
Exclude<Options‚ "key">

MoveComponentOptions

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Supertypes
MoveOptions

component

Property
Type
ComponentCompatible
Since
ArcGIS Maps SDK for JavaScript 5.0

The component to move/add to the UI. This can be a widget instance, HTML element, a string value representing a DOM node ID.

ComponentCompatible

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

UIPosition

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

The UI position of an element in the view.

Type
UICornerPosition | "manual"

UICornerPosition

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Type
"top-left" | "top-right" | "bottom-left" | "bottom-right" | "top-leading" | "top-trailing" | "bottom-leading" | "bottom-trailing"

ViewPadding

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

left

Property
Type
number
Since
ArcGIS Maps SDK for JavaScript 5.0

The left padding (in pixels).

top

Property
Type
number
Since
ArcGIS Maps SDK for JavaScript 5.0

The top padding (in pixels).

right

Property
Type
number
Since
ArcGIS Maps SDK for JavaScript 5.0

The right padding (in pixels).

bottom

Property
Type
number
Since
ArcGIS Maps SDK for JavaScript 5.0

The bottom padding (in pixels).