1. Reference
  2. Display

<progress-ring>

A round progress indicator: an arc from 0 to max around a track, with its children centered inside.

Display

This tag has more than one name. Every spelling is the same tag, so write whichever feels natural. Pick one and every example on this page uses it.

progress-ring.ham
<column style="items-center gap-12">
    <progress-ring value="68"
                   max="100"
                   size="140"
                   stroke-width="10"
                   color="teal-500">
        <text style="font-2xl font-bold">68%</text>
    </progress-ring>
    <text style="muted">Daily goal: 6,800 of 10,000 steps</text>
</column>
The snippet drawn by Hype Apps on a phone, in light mode The snippet drawn by Hype Apps on a phone, in dark mode
This snippet as Hype Apps draws it on a phone. It follows this page's light or dark theme.

Attributes

NameWhat it doesDefault
animate Milliseconds the arc takes to glide to a new value (0 = jump)
number
300
background-color Track color (the rest of the circle)
color
gray-200
cap The ends of the arc: rounded or cut flat
round, flat
round
color Arc color (default: the primary color)
color
loop The value is taken modulo max: past a full turn the arc glides on to full, then continues from empty, never rewinding (a ring that keeps counting). Without it the arc is clamped at full.
boolean
false
max The value that means a full ring, as in HTML <progress>: value="40" max="100" draws 40%.
number
1
size Outer diameter in px; the ring is that square
number
48
stroke-width Thickness of the arc and track in px
number
4
value Progress from 0 to max (none = indeterminate, a spinner)
number

Any tag also takes gestures: @on.tap, @on.longpress, @on.doubletap and @on.swipeleft (and right, up and down). @click runs on a tap too.

This page is also Markdown, and all of HAM is in llms.txt.