Skip to content

feat(fab-button): add animated prop to disable state transitions and expose inner part - #31743

Merged
ShaneK merged 6 commits into
feature-9.1from
FW-7511
Nov 18, 2026
Merged

ShaneK merged 6 commits into
feature-9.1from
FW-7511

Conversation

@ShaneK

@ShaneK ShaneK commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Issue number: resolves #20177


What is the current behavior?

Currently, the fab button always rotates and scales between its content and the close icon when a fab list opens. That transition lives in the shadow DOM, so there's no way to turn it off, and it ignores both the global animated: false config and prefers-reduced-motion.

What is the new behavior?

  • Added an animated prop to ion-fab-button. When it's false, or the global animated config is false, the button doesn't transition at all.
  • With prefers-reduced-motion: reduce, the content and close icon crossfade instead of rotating and scaling, and the iOS press no longer scales the button. This follows the reduced motion rule in the animations and gestures design doc, which is to remove movement and scaling but keep short opacity changes.

Does this introduce a breaking change?

  • Yes
  • No

But it is a new feature, which is why it's pointed at feature-9.1

Other information

The prop only affects the button it's set on, so buttons inside an ion-fab-list need it too. The md ripple still plays with animated="false" because it comes from ion-ripple-effect rather than the button's transitions, but the global animated: false config already turns it off.

To check reduced motion, turn on "Emulate CSS media feature prefers-reduced-motion" in the DevTools Rendering panel.

Current dev build:

9.0.11-dev.11794501674.16819717

Animation test page (MD)
Animation test page (iOS)
Animation test page with animated: false config

Docs

Related docs PR

@ShaneK
ShaneK requested a review from a team as a code owner November 12, 2026 14:53
@ShaneK
ShaneK requested a review from brandyscarney November 12, 2026 14:53
@vercel

vercel Bot commented Nov 12, 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 18, 2026 4:24pm UTC

Request Review

@github-actions github-actions Bot added package: core @ionic/core package package: angular @ionic/angular package package: vue @ionic/vue package labels Nov 12, 2026

@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

@brandyscarney brandyscarney left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good! I checked the default, reduced motion, animated="false" and the global config on the preview, and they all behave as described. One small suggestion on the reduced motion transition.

One question, not blocking: ion-fab-list still staggers its buttons in (i * 30ms in activatedChanged) when animated is false, the global config is off, or reduced motion is on. Setting animated on the list buttons doesn't affect that, since it only gates their own transitions. It's barely visible, so I'm fine leaving it, but should the list skip the stagger when the main fab button isn't animated? Could be a follow-up.

@ShaneK ShaneK changed the title feat(fab-button): add animated prop to disable state transitions feat(fab-button): add animated prop to disable state transitions and expose inner part Nov 18, 2026
@ShaneK

ShaneK commented Nov 18, 2026

Copy link
Copy Markdown
Member Author

Thanks @brandyscarney! I think it could make a lot of sense for that to be a new public property on ion-fab-list, so I've created FW-7991 to track that and get that into 9.1 as its own separate feature

@brandyscarney brandyscarney left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for making the changes and follow-up ticket. Looks great!

…nto FW-7511

# Conflicts:
#	core/src/components/fab-button/fab-button.tsx
#	core/src/components/segment-view/test/dynamic-height/segment-view.e2e.ts
@ShaneK
ShaneK merged commit 0113c64 into feature-9.1 Nov 18, 2026
55 checks passed
@ShaneK
ShaneK deleted the FW-7511 branch November 18, 2026 16:37
ShaneK added a commit that referenced this pull request Nov 23, 2026
…1778)

Issue number: internal

---------

## What is the current behavior?

Currently, a fab list shows its buttons one at a time when it opens,
even when the main fab button has `animated="false"`, the global
`animated` config is `false`, or the user prefers reduced motion.
Setting `animated` on the list buttons doesn't help because it only
covers their own transitions.

## What is the new behavior?

- Added an `animated` prop to `ion-fab-list`. When it's `false`, every
button in the list shows at once.
- The list also skips the stagger when the global `animated` config is
`false` or the user prefers reduced motion.
- Inside an `ion-fab`, the list follows the main fab button's `animated`
unless the list sets its own. This only controls whether the list
buttons show one at a time. Each button in the list still scales and
fades in unless it also has `animated="false"`.

## Does this introduce a breaking change?

- [ ] Yes
- [X] No

But it is a new feature, which is why it's pointed at `feature-9.1`

## Other information

This is the follow-up from [Brandy's review on
#31743](#31743 (review)).

The fab on the right of the fab button animation test page has
`animated="false"` on its main button, so its list should now open all
at once:

[Fab button animation test
page](https://ionic-framework-git-fw-7991-ionic1.vercel.app/src/components/fab-button/test/animation?ionic:mode=md)

This branch was successfully deployed

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

Labels

package: angular @ionic/angular package package: core @ionic/core package package: vue @ionic/vue package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants