0

I use the third-party component named "slider" (rc-slider). I need to add an additional element inside the slider slider (div class = "rc-slider-handle").

<div class="rc-slider">
   <div class="rc-slider-rail" style="..."></div>
   <div class="rc-slider-track" style="..."></div>
   <div class="rc-slider-step"></div>
   <div role="slider" tabindex="0" ... class="rc-slider-handle" style="..."> 
       // new element should be added here
   </div>
   <div class="rc-slider-mark"></div>
</div>

Using from my react component:

    <Slider
      min={...}
      max={...}
      value={...}
      onChange={...}
    />

1 Answer 1

1

According to rc-slider docs, you're able to pass a handle prop:

<Slider
  min={...}
  max={...}
  value={...}
  onChange={...}
  handle={() => <div className="rc-slider-handle" />}
/>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.