Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

140
Views
Hide slider thumb in material-ui library

I'm trying to hide the slide thumb. I tried to do it without using a library but then I think that it should be better to use material-ui because maybe it would be easier but I'm here asking help.

Here is my code:

import * as React from "react";
import Slider from "@mui/material/Slider";
import "./style.css";

export default function ContinuousSlider() {
  const [value, setValue] = React.useState(30);

  const handleChange = (event, newValue) => {
    setValue(newValue);
  };

  return (
    <Slider
      aria-label="Volume"
      value={value}
      onChange={handleChange}
      focusVisible={false}
    />
  );
}

style:

.MuiSlider-thumb {
  background-color: orange;
  box-shadow: none;
  width: 0px;
  height: 0px;
}

.MuiSlider-rail {
  background-color: orange;
  border: none;
}

.MuiSlider-track {
  background-color: red;
  border: none;
}

.MuiSlider-rail {
  background-color: green;
}

working code here

result:

enter image description here

on focus

enter image description here

I was able to hide the main thumb but not the "secondary thumb". I don't know how to call it, the light blue one that appears clicking on the thumb. How can I remove it?

I want the following style always, even when user drag the thumb: enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You could add style override for hover (pseudo-class) and active state (for MUI it is .Mui-active)

.MuiSlider-thumb:is(:hover, .Mui-active) {
  display: none;
}

Demo

Edit ContinuousSlider Material Demo (forked)

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!