mui / material-ui

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.
https://mui.com/material-ui/
MIT License
93.21k stars 32.09k forks source link

[material-ui][ButtonGroup] Disabled styles should be improved #35045

Open vmilan opened 1 year ago

vmilan commented 1 year ago

Duplicates

Latest version

Summary 💡

Expected Behavior

The border color in outlined ButtonGroup should remain the original color when a button is disabled. Example:

Screenshot 2022-11-08 at 13 29 48

Current Behavior

The actual styles for ButtonGroup when a button is disabled, look like this:

Screenshot 2022-11-08 at 13 21 56

The border color doesn't seem correct, it doesn't feel like a group of buttons.

Steps to Reproduce

Link: https://codesandbox.io/s/buttongroup-disabled-oj1ufn

Enviroment

Examples 🌈

Screenshot 2022-11-08 at 13 29 48

Motivation 🔦

The border color doesn't seem correct, it doesn't feel like a group of buttons.

mnajdova commented 1 year ago

I am tagging @danilo-leal to get perspective on the matter from a design point of view. @vmilan did you find some specification around this so far?

vmilan commented 1 year ago

@mnajdova There is a reference in material docs: https://m3.material.io/components/segmented-buttons/specs#7bcc5619-f77a-4d34-a202-b6b686eed1cb

Our design team have done some exploratory work with two proposals for implementation:

v1

image (3) Screenshot 2022-11-10 at 14 47 22 Screenshot 2022-11-10 at 14 47 31

v2

Screenshot 2022-11-10 at 14 47 18 Screenshot 2022-11-10 at 14 47 27
mnajdova commented 1 year ago

Thanks! The link you've shared is for md3, which we are definitely going to adopt in the new components. For the changes you are proposing, I would maybe add them in the v6 milestone, as changing the styles at this moment, may break the UI, especially if some style overrides are used. I am adding this to the v6 milestone, so that we have it in mind when starting the work on v6.