Skip to content

[Slider] Remove deprecated CSS classes#48074

Merged
siriwatknp merged 6 commits intomui:masterfrom
siriwatknp:worktree-remove-deprecated-slider-classes
Mar 24, 2026
Merged

[Slider] Remove deprecated CSS classes#48074
siriwatknp merged 6 commits intomui:masterfrom
siriwatknp:worktree-remove-deprecated-slider-classes

Conversation

@siriwatknp
Copy link
Member

@siriwatknp siriwatknp commented Mar 24, 2026

Summary

Removes the following deprecated CSS classes from the Slider component:

  • thumbColorPrimary — use .MuiSlider-colorPrimary > .MuiSlider-thumb instead
  • thumbColorSecondary — use .MuiSlider-colorSecondary > .MuiSlider-thumb instead
  • thumbColorError — use .MuiSlider-colorError > .MuiSlider-thumb instead
  • thumbColorInfo — use .MuiSlider-colorInfo > .MuiSlider-thumb instead
  • thumbColorSuccess — use .MuiSlider-colorSuccess > .MuiSlider-thumb instead
  • thumbColorWarning — use .MuiSlider-colorWarning > .MuiSlider-thumb instead
  • thumbSizeSmall — use .MuiSlider-sizeSmall > .MuiSlider-thumb instead

Also removes the deprecated SliderComponentsPropsOverrides interface (use SliderRootSlotPropsOverrides instead).

Breaking change

Users relying on deprecated compound CSS classes should migrate to combining individual classes. A codemod is available:

npx @mui/codemod@latest deprecations/slider-classes <path>

@siriwatknp siriwatknp added breaking change Introduces changes that are not backward compatible. package: material-ui Specific to Material UI. labels Mar 24, 2026
@mui-bot
Copy link

mui-bot commented Mar 24, 2026

Netlify deploy preview

Bundle size report

Bundle Parsed size Gzip size
@mui/material ▼-303B(-0.06%) ▼-60B(-0.04%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against 96c5273

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@siriwatknp siriwatknp added the scope: slider Changes related to the slider. label Mar 24, 2026

```diff
-.MuiSlider-thumbColorPrimary
+.MuiSlider-thumb.MuiSlider-colorPrimary
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be:

.MuiSlider-colorPrimary > .MuiSlider-thumb

x the other places.

…s in migration doc

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…estore thumb class assertions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
siriwatknp and others added 2 commits March 24, 2026 15:53
Co-authored-by: Zeeshan Tamboli <zeeshan.tamboli@gmail.com>
Signed-off-by: Siriwat K <siriwatkunaporn@gmail.com>
Co-authored-by: Zeeshan Tamboli <zeeshan.tamboli@gmail.com>
Signed-off-by: Siriwat K <siriwatkunaporn@gmail.com>
@mui mui deleted a comment from ZeeshanTamboli Mar 24, 2026
@siriwatknp siriwatknp merged commit 6243f7c into mui:master Mar 24, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Introduces changes that are not backward compatible. package: material-ui Specific to Material UI. scope: slider Changes related to the slider.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants