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

127
Views
react-input-range library in React

I am trying to create a Range bar like this

enter image description here

using react-input-range

but when writing this code

import InputRange from 'react-input-range';
import 'react-input-range/lib/css/index.css';

<form action="">
  <InputRange
      maxValue={100}
      minValue={0}
      formatLabel={value => `$${value}`}
      value={range}
      onChange={value => setRange(value)}
      onChangeComplete={value => console.log(value)}
    />
</form>

I got this

enter image description here

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

0

Set the initial value of range(state) and you are good to go.

const [range, setRange ]= useState({
        min: 5,
        max: 10,
      });
    <form action="">
      <InputRange
          maxValue={100}
          minValue={0}
          formatLabel={value => `$${value}`}
          value={range}
          onChange={value => setRange(value)}
          onChangeComplete={value => console.log(value)}
        />
    </form>
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!