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

115
Views
How can I edit the percent of progress bar in Ant design?

I am now using react js and importing the ant design progress component(see https://ant.design/components/progress/) But I fail to edit the percentage of the bar with javascript after it is displayed. I initiate it will this Html code.

<Progress id="progressBar" 

strokeColor={{from: '#108ee9', to: '#87d068'}}

percent={0}

status="active"/>

I tried to call progressBar.percent to edit but it does not work.

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

0

Just store your pecentage in useState

const [percent, setPercent] = useState(0)

and pass it to Progress:

<Progress id="progressBar" 
strokeColor={{from: '#108ee9', to: '#87d068'}}
percent={percent}
status="active"/>

and then simply call setPercent(50) to change your state.

This is fundamental principe how to work with states in react. You can read more here

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!