Circular Progress Bar Using SVG | HTML | CSS | JS

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ก.ย. 2024
  • Let's learn how to create a SVG circular progress bar using HTML, CSS and few lines of JavaScript code. Don't forget to like, share and subscribe if you found the video helpful.
    Other videos from this channel:
    / @uicode
    theuicode.com
    / theuicode
    Source code:
    github.com/ui-...

ความคิดเห็น • 31

  • @b4rt009
    @b4rt009 3 ปีที่แล้ว +1

    It took me a few days to find a reasonable tutorial explaining how to make a circular progress bar. Thanks a lot mate!

    • @UICode
      @UICode  3 ปีที่แล้ว

      Glad I could help!🙌

  • @M1989KG
    @M1989KG 4 ปีที่แล้ว +1

    Great video. Very simple and easy to understand. Keep up the good work. Looking forward to see more tutorials from you.

    • @UICode
      @UICode  4 ปีที่แล้ว +1

      Milos Mladenovic Glad you liked

  • @acobster
    @acobster 2 ปีที่แล้ว +2

    If you set the pathLength attribute on your circle element to "100" and set progress circle's dynamic stroke-dasharray to `${percent} 100`, you don't need to worry about the complex math with circumference & pixels. Just use the straight percent and SVG will figure out the length in pixels for you.

    • @UICode
      @UICode  2 ปีที่แล้ว

      Thanks for that tip, I wasn't aware. I'll try that out😃

    •  ปีที่แล้ว

      yo acobster thank you for the tip!! all these people and you are the only one with the best solution

  • @zamanEhsani
    @zamanEhsani 3 ปีที่แล้ว

    helped me alot. what i was looking for. Thanks alot!!!

    • @UICode
      @UICode  3 ปีที่แล้ว +1

      Glad it helped!

  • @CodeingWithManoj
    @CodeingWithManoj ปีที่แล้ว

    great video

  • @ihsannuruliman4005
    @ihsannuruliman4005 ปีที่แล้ว

    this is really nice, even though looks very tricky, but what is not tricky is css? XD

  • @medooegy5263
    @medooegy5263 2 ปีที่แล้ว

    thanks for the great work, the simplest explanation ever for svg Circular Progress. but if i need to add percentage counter in the middle how could i do that?

    • @UICode
      @UICode  2 ปีที่แล้ว +1

      Thanks. Just wrap svg with another div or span to show the value in the middle. Here's the gist: gist.github.com/ui-code/c9f8609010369c880648e217c4c17d0c

    • @medooegy5263
      @medooegy5263 2 ปีที่แล้ว

      @@UICode thank you so much

  • @ahanabhabibfahad7271
    @ahanabhabibfahad7271 2 ปีที่แล้ว

    Thank's a lot for the simplified /easy code for progress bar. can i know your vscode light theme name?

    • @UICode
      @UICode  2 ปีที่แล้ว

      Thank you. The theme is FlatUI : marketplace.visualstudio.com/items?itemName=lkytal.FlatUI

  • @webmaker_studio
    @webmaker_studio 2 ปีที่แล้ว

    Thanks

  • @zamanEhsani
    @zamanEhsani 3 ปีที่แล้ว

    how to animate to fill the strok dash? like the percentage from 0 to 60% to be filled?

    • @UICode
      @UICode  3 ปีที่แล้ว

      Just add transition property and make little change in the code. It will work. I have quickly updated the code for you. Check it out: gist.github.com/ui-code/c031581536867e8b8968f134d02989fb

  • @prantoroy2359
    @prantoroy2359 3 ปีที่แล้ว

    Thanks for this tutorial. I am trying to make multiple progress bars but it's showing an error. Would you please help me?

    • @UICode
      @UICode  3 ปีที่แล้ว

      You need to create a reusable component by using this code and use it multiple times as you need. Which framework are you using?

    • @MTrof
      @MTrof 3 ปีที่แล้ว

      probably instead of querySelector, you should use querySelectorAll and go through a loop

  • @locky916
    @locky916 3 ปีที่แล้ว

    firstly, Thank you for your effort.But I am still struggling. I write the same code as you do but still I don't get the result. It shows always 100%

    • @UICode
      @UICode  3 ปีที่แล้ว

      Hey..check out the link to source code in the description. You can correct it by referring the code.

  • @chitrabanoth7792
    @chitrabanoth7792 2 ปีที่แล้ว +1

    how to write 50% inside the circle

    • @UICode
      @UICode  2 ปีที่แล้ว

      Check out this updated gist : gist.github.com/ui-code/c9f8609010369c880648e217c4c17d0c

    • @chitrabanoth7792
      @chitrabanoth7792 2 ปีที่แล้ว

      thank you

    • @chitrabanoth7792
      @chitrabanoth7792 2 ปีที่แล้ว

      in this shall we add three to four circular progress at once

  • @TraceguyRune
    @TraceguyRune ปีที่แล้ว

    Make a half circle guide

  • @vanshitasingh6251
    @vanshitasingh6251 3 ปีที่แล้ว

    How can we make this responsive?

    • @UICode
      @UICode  2 ปีที่แล้ว

      Use media queries or responsive libraries like tailwind css or bootstrap.