<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5HGSQD2L" height="0" width="0" style="display:none;visibility:hidden" title="GTM"></iframe>

Zoom Controls

Zoom in and out of the current view.
styleKey: zoomControls

Zoom Controls provide buttons to let the user zoom in and out of the current view, as well as show the current level of zoom.

Usage

The preview has been updated.

Disabled

Use disabled on Zoom Control button when its action is at its boundary (e.g., max or min zoom)

The preview has been updated.

ZoomControlsIn
See core props for additional props that can be applied to this component.
proptyperequireddefaultdeprecation notes
⚠️ Deprecated
visuallyHiddenLabel
A localized label which describes the button to screen-reader users Typically it is just a string like "Zoom in" @deprecated This prop will be removed in favor of SWAN's i18n system. Please opt in to the i18n system for continued support.
ReactNode
false
null
This prop will be removed in favor of SWAN's i18n system. Please opt in to the i18n system for continued support.
⚠️ Deprecated
accessibleText
A localized label which describes the button to screen-reader users Typically it is just a string like "Zoom in" @deprecated This prop will be removed in favor of SWAN's i18n system. Please opt in to the i18n system for continued support.
stringnull
false
null
This prop will be removed in favor of SWAN's i18n system. Please opt in to the i18n system for continued support.
ZoomControlsOut
See core props for additional props that can be applied to this component.
proptyperequireddefaultdeprecation notes
⚠️ Deprecated
visuallyHiddenLabel
A localized label which describes the button to screen-reader users Typically it is just a string like "Zoom out" @deprecated This prop will be removed in favor of SWAN's i18n system. Please opt in to the i18n system for continued support.
ReactNode
false
null
This prop will be removed in favor of SWAN's i18n system. Please opt in to the i18n system for continued support.
⚠️ Deprecated
accessibleText
A localized label which describes the button to screen-reader users Typically it is just a string like "Zoom out" @deprecated This prop will be removed in favor of SWAN's i18n system. Please opt in to the i18n system for continued support.
stringnull
false
null
This prop will be removed in favor of SWAN's i18n system. Please opt in to the i18n system for continued support.
ZoomControlsValue
See core props for additional props that can be applied to this component.
proptyperequireddefaultdeprecation notes
⚠️ Deprecated
visuallyHiddenLabel
A localized label which describes the component to screen-reader users Typically it is just a string like "Current zoom level" @deprecated This prop will be removed in favor of SWAN's i18n system. Please opt in to the i18n system for continued support.
ReactNode
false
null
This prop will be removed in favor of SWAN's i18n system. Please opt in to the i18n system for continued support.
⚠️ Deprecated
accessibleText
A localized label which describes the component to screen-reader users Typically it is just a string representing the zoom value "Current zoom level" @deprecated This prop will be removed in favor of SWAN's i18n system. Please opt in to the i18n system for continued support.
stringnull
false
null
This prop will be removed in favor of SWAN's i18n system. Please opt in to the i18n system for continued support.
value
The zoom value to display (typically a percentage, e.g. "100" for 100%)
number
false
null

Internationalization

SWAN's Internationalization System allows SWAN components to render with fully translated and accessible text out-of-the-box. The following keys are provided to allow you to override the default translation.

Default TextKey
Zoom in
zoom-controls-in.accessible-text-for-zoom-in
Zoom out
zoom-controls-out.accessible-text-for-zoom-out
Current zoom level is {{value}}
zoom-controls-value.accessible-text-for-zoom-value