Skip to content

Progress ring

A ring that fills clockwise from the top as value reaches max. show_value writes the percentage in the middle; value=None spins until the task knows how far it is.

ui.progress_ring · Category: Feedback · Full reference →

Progress ringProgress ring
  • For a download, an upload or a goal shown in little space.
  • In a row of a list, use a small one without text.
import pyzed as pz
from pyzed import ui
pz.row([
ui.progress_ring(0.25),
ui.progress_ring(0.6, size=56, thickness=5, show_value=True),
ui.progress_ring(1.0, size=56, thickness=5, tint="success", label="Done"),
ui.progress_ring(None),
], spacing=20, align="center")
Progress ring: value=0.3Progress ring: value=0.3
value=0.3
Code
ui.progress_ring(0.3)
Progress ring: show_value=TrueProgress ring: show_value=True
show_value=True
Code
ui.progress_ring(0.72, size=64, thickness=6, show_value=True)
Progress ring: label="3/8"Progress ring: label="3/8"
label="3/8"
Code
ui.progress_ring(3, max=8, size=56, thickness=5, label="3/8")
Progress ring: tint="warning"Progress ring: tint="warning"
tint="warning"
Code
ui.progress_ring(0.45, size=48, tint="warning", show_value=True)
Progress ring: SpinningProgress ring: Spinning
Spinning
Code
ui.progress_ring(None, size=40)
Progress ring: FullProgress ring: Full
Full
Code
ui.progress_ring(1, size=48, tint="success", show_value=True)

Progress ring has no events of its own: it shows what you give it. Like every widget it also has the 18 common events (click, double_click, right_click, mouse_enter, drag, key_down, resize…), attached with .on(...): see Events and Events of every component.

progress_ring(
value,
*,
max=1.0,
size=40,
thickness=4,
tint='accent',
show_value=False,
label=None,
theme=None,
)

A round progress bar that fills clockwise from the top. value=None spins.

Property Default Description
value required Progress up to max, or None to spin.
max 1.0 The value of a full ring.
size 40 Diameter in pixels.
thickness 4 Width of the ring.
tint "accent" Semantic color: "accent", "error", "warning", "success", "info" or a token.
show_value False Writes the percentage in the middle.
label None Any other text in the middle ("3/8").
theme None Theme to use instead of the current one (pyzed.theme.current()).

Full reference →