Material Guidelines changed the name of buttons’ variants. I’m proposing to update the variants name to follow the spec and implement those that are missing.
The rosetta stone is:
| Material UI Beta 45 | Current API | Material Guidelines | Proposed API |
| --- | --- | --- | --- |
| Flat Button | variant="flat" | [Text Button] | variant="text" |
| N/A | N/A | [Outlined Button] | variant="outlined |
| Raised Button | variant="raised" | [Contained Button] | variant="contained" |
| N/A | N/A | [Toggle Button] | toggled variant="outlined" |
I’m not proposing a specific variant for Toggle Buttons because demos present them as button bars (hence could be a good idea have a specific component) where they are mostly outlined buttons with an additional toggled state, or Icon Buttons with different icons based on the state.
@mbrookes I'm not 💯% up-to-date with the latest improvements you did on this topic. Have we moved forward? At least, I know we gonna have to deprecate and remove the API at some point.
What about unelevated as well?
see:
https://material.io/develop/web/components/buttons/#variants
https://material-components.github.io/material-components-web-catalog/#/component/button
@gunn4r Can you find it in the official specificiation?
@oliviertassinari
Yeah I'm not seeing a reference to it here:
https://material.io/design/components/buttons.html
But you do find it in their official Design and API documentation:
https://material.io/develop/web/components/buttons/#variants
As well as their official button demo here:
https://material-components.github.io/material-components-web-catalog/#/component/button
I suggest we stick with the spec names, rather than what the MCW team are using.
Legacy variant names will be deprecated with 3.2.0 i.e. deprecation warnings will be logged. The flat and raised variants were already mapped to text and contained respectively.
Most helpful comment
I suggest we stick with the spec names, rather than what the MCW team are using.