Repository navigation
feat(config): add haptics config option to disable haptic feedback - #31724
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
1 of 2 tasks
thetaPC
approved these changes
Nov 11, 2026
OS-jacobbell
approved these changes
Nov 13, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-refresherand the iOSion-alertandion-action-sheetbuttons, even when the app gives users a setting to turn haptics off.What is the new behavior?
This adds a
hapticsconfig option that defaults totrue. Setting it tofalse(e.g.,setupIonicReact({ haptics: false })) stops Ionic components from triggering haptics. The check lives inhapticAvailable(), which every haptic helper already goes through, so it covers all of the components above without changing them. It also handlesionic:haptics=falsein the URL, the same as other boolean options.Does this introduce a breaking change?
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