Skip to content

docs(config): add haptics global config option - #4837

Merged
ShaneK merged 1 commit into
feature-9.1from
FW-7505
Nov 13, 2026
Merged

ShaneK merged 1 commit into
feature-9.1from
FW-7505

Conversation

@ShaneK

@ShaneK ShaneK commented Nov 10, 2026

Copy link
Copy Markdown
Member

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 haptics row. It lists the components that trigger haptics and says that setting it to false turns them off. The description matches the JSDoc on the option in IonicConfig.

Does this introduce a breaking change?

  • Yes
  • No

Other information

This documents the option added in ionic-framework#31724

@ShaneK
ShaneK requested a review from a team as a code owner November 10, 2026 19:39
@ShaneK
ShaneK requested review from thetaPC and removed request for a team November 10, 2026 19:39
@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-docs Ready Ready Preview Nov 10, 2026 7:40pm 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

@ShaneK
ShaneK merged commit 5f0b047 into feature-9.1 Nov 13, 2026
7 checks passed
@ShaneK
ShaneK deleted the FW-7505 branch November 13, 2026 22:10
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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants