Passing zoom value via children is deprecated in SWAN v3.24
Always use the explicit value prop. The component uses this value to generate accessible announcements via SWAN's i18n system.
Passing zoom value via children is deprecated in SWAN v3.24
Always use the explicit value prop. The component uses this value to generate accessible announcements via SWAN's i18n system.
<div>. No props beyond core props and native HTML attributes.<button>.| prop | type | required | default | deprecation notes |
|---|---|---|---|---|
⚠️ Deprecated visuallyHiddenLabelA 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 accessibleTextA 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. |
<button>.| prop | type | required | default | deprecation notes |
|---|---|---|---|---|
⚠️ Deprecated visuallyHiddenLabelA 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 accessibleTextA 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. |
<span>.| prop | type | required | default | deprecation notes |
|---|---|---|---|---|
⚠️ Deprecated visuallyHiddenLabelA 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 accessibleTextA 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. |
valueThe zoom value to display (typically a percentage, e.g. "100" for 100%) | number | false | null |
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 Text | Key |
|---|---|
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 |