mui-org/material-ui









Extended Fab enhancements? #12017
simoami posted onGitHub
Hi @oliviertassinari and @mbrookes,
I just gave the extended fab a run. Thanks for adding it. However, I believe that the extended fab solution can be improved to enable the following behavior, part of the new Google guideline.
The following demo is based on the existing example on material-ui.com but modified on the fly from dev tools:
Here's my observations from the current implementation:
- There's really no need for a new variant because switching between variants won't allow for the transition above. Instead, I suggest we keep the same Fab variant and allow for a label like we do with regular buttons. Introduce a property for hiding the label.
hideLabel
orhideText
. - The margin between the icon and text should be assigned to the text, because it should collapse when the label shrinks to leave the icon alone without a margin hanging to the right.
- I noticed that the extended fab height is smaller than the Fab button height, making the transition between the normal and extended fab difficult.
- Border radius should be a fixed value of (height / 2), not 50%, which gives you an oval factor form when text is present.
Thoughts?