Repository navigation
docs(config): add haptics global config option - #4837
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Merged
1 of 2 tasks
OS-jacobbell
approved these changes
Nov 13, 2026
ShaneK
added a commit
to ionic-team/ionic-framework
that referenced
this pull request
Nov 13, 2026
…31724) 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 - [X] 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
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: internal
What is the current behavior?
Currently, the config options table doesn't list
haptics, which is coming in 9.1.What is the new behavior?
The table now has a
hapticsrow. It lists the components that trigger haptics and says that setting it tofalseturns them off. The description matches the JSDoc on the option inIonicConfig.Does this introduce a breaking change?
Other information
This documents the option added in ionic-framework#31724