Skip to content

feat(config): add haptics config option to disable haptic feedback - #31724

Merged
ShaneK merged 3 commits into
feature-9.1from
FW-7505
Nov 13, 2026
Merged

ShaneK merged 3 commits into
feature-9.1from
FW-7505

Conversation

@ShaneK

@ShaneK ShaneK commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Issue number: resolves #28719


What is the current behavior?

Currently, there's no way to turn off the haptics Ionic triggers. Any app with the Capacitor Haptics plugin gets them in ion-toggle, ion-picker-column, ion-reorder-group, ion-refresher and the iOS ion-alert and ion-action-sheet buttons, even when the app gives users a setting to turn haptics off.

What is the new behavior?

This adds a haptics config option that defaults to true. Setting it to false (e.g., setupIonicReact({ haptics: false })) stops Ionic components from triggering haptics. The check lives in hapticAvailable(), which every haptic helper already goes through, so it covers all of the components above without changing them. It also handles ionic:haptics=false in the URL, the same as other boolean options.

Does this introduce a breaking change?

  • Yes
  • No

Other information

This is a startup option only. The config is read each time a haptic would fire, but there's no public way to change it after the app starts, which was the concern raised in the issue.

We don't have a public way to change the config after startup at this time, but you can change it with (window as any).Ionic.config.set('haptics', false) and, since this change reads the config on every check, it should take effect immediately.

Docs PR: ionic-team/ionic-docs#4837

@ShaneK
ShaneK requested a review from a team as a code owner November 10, 2026 19:27
@ShaneK
ShaneK requested a review from brandyscarney November 10, 2026 19:27
@vercel

vercel Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ionic-framework Ready Ready Preview Nov 13, 2026 10:14pm UTC

Request Review

@thetaPC thetaPC left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, minor suggestion

Comment thread core/src/utils/config.ts Resolved

@thetaPC thetaPC left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ShaneK
ShaneK merged commit 52ce6ff into feature-9.1 Nov 13, 2026
55 checks passed
@ShaneK
ShaneK deleted the FW-7505 branch November 13, 2026 22:31

This branch was successfully deployed

1 active deployment
Preview — c00b1c3c Deployed Nov 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants