import "@arcgis/map-components/components/arcgis-expand";
Expand component acts as a clickable button for opening content.
Demo
Properties
Property | Attribute | Type |
---|---|---|
auto-collapse | boolean | |
auto-destroy-disabled | boolean | |
close-on-esc | Function | boolean | |
collapse-icon | string | |
collapse-tooltip | string | |
expanded | boolean | |
expand-icon | string | |
expand-tooltip | string | |
focus-trap-enabled | boolean | |
group | string | |
icon | string | |
icon-number | number | |
label | string | |
mode | "auto" | "drawer" | "floating" | |
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" | |
position | "bottom-leading" | "bottom-left" | "bottom-right" | "bottom-trailing" | "manual" | "top-leading" | "top-left" | "top-right" | "top-trailing" | |
reference-element | ArcgisLinkChart | ArcgisMap | ArcgisScene | string |
autoCollapse
autoCollapse: boolean
Automatically collapses the expand widget instance when the view's viewpoint updates.
- Attribute
- auto-collapse
- Default value
- false
autoDestroyDisabled
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.
- Attribute
- auto-destroy-disabled
- Default value
- false
closeOnEsc
closeOnEsc: Function | boolean
When true, the Expand widget will close after the Escape key is pressed when the keyboard focus is within its content.
- Attribute
- close-on-esc
- Default value
- true
collapseIcon
collapseIcon: string
Calcite icon used to style the Expand button when the content can be collapsed.
- Attribute
- collapse-icon
- Default value
- "chevrons-right"
collapseTooltip
collapseTooltip: string
Tooltip to display to indicate Expand widget can be collapsed.
- Attribute
- collapse-tooltip
- Default value
- "Collapse" (English locale)
expanded
expanded: boolean
Indicates whether the widget is currently expanded or not.
- Attribute
- expanded
- Default value
- false
expandIcon
expandIcon: string
Calcite icon used when the widget is collapsed.
- Attribute
- expand-icon
- Default value
- "chevrons-left"
expandTooltip
expandTooltip: string
Tooltip to display to indicate Expand widget can be expanded.
- Attribute
- expand-tooltip
- Default value
- "Expand" (English locale)
focusTrapEnabled
focusTrapEnabled: boolean
Disables focus trapping within the expand widget.
- Attribute
- focus-trap-enabled
- Default value
- false
group
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.
- Attribute
- group
icon
icon: string
Icon which represents the component. Typically used when the component is controlled by another component (e.g. by the Expand component). Search Calcite Icons for possible values.
- Attribute
- icon
- Default value
- null
iconNumber
iconNumber: number
A number to display at the corner of the widget to indicate the number of, for example, open issues or unread notices.
- Attribute
- icon-number
mode
mode: "auto" | "drawer" | "floating"
The mode in which the widget displays.
- Attribute
- mode
- Default value
- "auto"
placement
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.
- Attribute
- placement
- Default value
- null
position
position: "bottom-leading" | "bottom-left" | "bottom-right" | "bottom-trailing" | "manual" | "top-leading" | "top-left" | "top-right" | "top-trailing"
- Attribute
- position
- Default value
- "top-right"
referenceElement
referenceElement: ArcgisLinkChart | ArcgisMap | ArcgisScene | string
- Attribute
- reference-element
Methods
Method | Signature |
---|---|
collapse(): Promise<void> | |
componentOnReady(): Promise<void> | |
destroy(): Promise<void> | |
expand(): Promise<void> | |
toggle(): Promise<void> |
componentOnReady
componentOnReady(): Promise<void>
Create a promise that resolves once component is fully loaded.
- Returns
- Promise<void>
Events
Event | Type |
---|---|
undefined |
arcgisReady
arcgisReady: undefined
Emitted when the component associated with a map view is is ready to be interacted with.
Events triggered on this element will be propagated to their outermost elements.
The event is composable and will propagate across the shadow DOM into the standard DOM.
The event's default behavior can be canceled, allowing for custom behavior to be implemented instead.