Use dark colors for code blocks Copy
1
import "@arcgis/map-components/components/arcgis-expand";
No specific import is needed for this component.
The Expand component acts as a clickable button for displaying interactive content, most commonly other components.
Demos Expand with Custom Content Expand with Component ContentThe Expand component with custom content. The content must be wrapped in a Placement component.
The Expand component with the Basemap Gallery component.
Properties autoCollapseProperty
autoCollapse: boolean
Automatically collapses the expand widget instance when the view's viewpoint updates.
Property
autoDestroyDisabled: boolean
If true, the component will not be destroyed automatically when it is disconnected from the document. This is useful when you want to move the component to a different place on the page, or temporarily hide it. If this is set, make sure to call the destroy method when you are done to prevent memory leaks.
Property
closeOnEsc: Function | boolean
When true, the Expand widget will close after the Escape key is pressed when the keyboard focus is within its content.
Property
collapseIcon: string
Calcite icon used to style the Expand button when the content can be collapsed.
Property
collapseTooltip: string
Tooltip to display to indicate Expand widget can be collapsed.
expanded: boolean
Indicates whether the widget is currently expanded or not.
Property
expandIcon: string
Calcite icon used when the widget is collapsed.
Property
expandTooltip: string
Tooltip to display to indicate Expand widget can be expanded.
Property
focusTrapDisabled: boolean
Disables focus trapping within the expand component.
deprecatedProperty
focusTrapEnabled: boolean
Disables focus trapping within the expand widget.
Property
group: string
This value associates two or more Expand widget instances with each other, allowing one instance to auto collapse when another instance in the same group is expanded.
Property
iconNumber: number
A number to display at the corner of the widget to indicate the number of, for example, open issues or unread notices.
Property
label: string
The widget's default label.
Property
mode: "auto" | "drawer" | "floating"
The mode in which the widget displays.
Property
placement: "auto" | "auto-end" | "auto-start" | "bottom" | "bottom-end" | "bottom-start" | "leading" | "leading-end" | "leading-start" | "left" | "left-end" | "left-start" | "right" | "right-end" | "right-start" | "top" | "top-end" | "top-start" | "trailing" | "trailing-end" | "trailing-start"
The placement used by the calcite popover when the widget is expanded.
Property
position: "bottom-leading" | "bottom-left" | "bottom-right" | "bottom-trailing" | "manual" | "top-leading" | "top-left" | "top-right" | "top-trailing"
Property
By assigning the id
attribute of the Map or Scene component to this property, you can position a child component anywhere in the DOM while still maintaining a connection to the Map or Scene.
No slots to display.
Events arcgisReadyEvent
arcgisReady: CustomEvent<void>
Emitted when the component associated with a map or scene view is is ready to be interacted with.
bubblesEvents triggered on this element will be propagated to their outermost elements.
composedThe event is composable and will propagate across the shadow DOM into the standard DOM.
cancelableThe event's default behavior can be canceled, allowing for custom behavior to be implemented instead.
Methods collapseMethod
collapse(): Promise<void>
Method
componentOnReady(): Promise<void>
Create a promise that resolves once component is fully loaded.
ExampleUse dark colors for code blocks Copy
1
2
3
4
const arcgisExpand = document.querySelector("arcgis-expand");
document.body.append(arcgisExpand);
await arcgisExpand.componentOnReady();
console.log("arcgis-expand is ready to go!");
Method
destroy(): Promise<void>
Permanently destroy the component.
Method
expand(): Promise<void>
Method
toggle(): Promise<void>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4