Material-ui: Proposal: rename button variants to follow the spec

Created on 8 May 2018  Â·  6Comments  Â·  Source: mui-org/material-ui

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.

  • [x] I have searched the issues of this repository and believe that this is not a duplicate.
breaking change Button material design umbrella

Most helpful comment

I suggest we stick with the spec names, rather than what the MCW team are using.

All 6 comments

@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.

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TimoRuetten picture TimoRuetten  Â·  3Comments

iamzhouyi picture iamzhouyi  Â·  3Comments

ryanflorence picture ryanflorence  Â·  3Comments

FranBran picture FranBran  Â·  3Comments

rbozan picture rbozan  Â·  3Comments