Skip to content

[Slider] Customize disabled state #25075

@mtr1990

Description

@mtr1990

I have overridden the disabled state of Slider.

but I don't know which syntax is correct:

const theme = createMuiTheme({
  components: {
    MuiSlider: {
      styleOverrides: {
        root: {
           // case 1: Working
          // "&.MuiSlider-root.Mui-disabled": {
          //   color: "red"
          // }

          // case 2: Not Working
          "&.Mui-disabled": {
            color: "red"
          }
        }
      }
    }
  }
});

Usually, I use method 2. but it doesn't seem to work in this case

More details:

https://codesandbox.io/s/continuousslider-material-demo-forked-3qphg

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready to takeHelp wanted. Guidance available. There is a high chance the change will be acceptedscope: sliderChanges related to the slider.type: bugIt doesn't behave as expected.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions