---
title: "Progress component | zenit Zig UI"
description: "Determinate and indeterminate progress. Percent, status, height and the indeterminate animation are one component."
url: https://ui.surf/zenit/components/progress
language: en
alternate_zh: https://ui.surf/zenit/zh/components/progress.md
alternate_es: https://ui.surf/zenit/es/components/progress.md
alternate_ja: https://ui.surf/zenit/ja/components/progress.md
alternate_ko: https://ui.surf/zenit/ko/components/progress.md
alternate_fr: https://ui.surf/zenit/fr/components/progress.md
alternate_de: https://ui.surf/zenit/de/components/progress.md
project: zenit v0.1.0-alpha (Zig 0.15.2, macOS)
source: https://github.com/version-next/zenit
---

# Progress

`ui.widgets.Progress`

Determinate and indeterminate progress.

[Video](https://ui.surf/zenit/media/stories/progress.mp4?v=42b61f878f)

**BEHAVIOR CONTRACT**

Percent, status, height and the indeterminate animation are one component.

**RECORDED INTERACTION**

Shows 25 / 60 / 100, error and indeterminate.

`examples/storybook/stories.zig:617`

```zig
// ── Progress ──
pub fn buildProgress(scope: *ui.Scope, cx: *ui.Cx) anyerror!*ui.Node {
    const a = cx.allocator;
    const c = try col(cx, 16);
    try c.appendChild(a, try label(cx, "Values 25% / 60% / 100%"));
    try c.appendChild(a, try W.Progress(.{ .value = 25, .width = 320, .show_text = true }).mount(scope, cx));
    try c.appendChild(a, try W.Progress(.{ .value = 60, .width = 320, .show_text = true }).mount(scope, cx));
    try c.appendChild(a, try W.Progress(.{ .value = 100, .width = 320, .status = .success, .show_text = true }).mount(scope, cx));

    try c.appendChild(a, try label(cx, "Heights (2 / 4 / 8 / 12)"));
    inline for (.{ 2, 4, 8, 12 }) |h| {
        try c.appendChild(a, try W.Progress(.{ .value = 50, .width = 320, .height = @as(f32, h) }).mount(scope, cx));
    }

    try c.appendChild(a, try label(cx, "Error / indeterminate / no-text"));
    try c.appendChild(a, try W.Progress(.{ .value = 40, .width = 320, .status = .@"error", .show_text = true }).mount(scope, cx));
    try c.appendChild(a, try W.Progress(.{ .indeterminate = true, .width = 320 }).mount(scope, cx));
    try c.appendChild(a, try W.Progress(.{ .value = 70, .width = 320, .show_text = false }).mount(scope, cx));
    return c;
}
```

[View source on GitHubexamples/storybook/stories.zig:617](https://github.com/version-next/zenit/blob/HEAD/examples/storybook/stories.zig#L617)

The story's verbatim source from the Storybook (zenit 4c50245 2026-10-01). `W` is `ui.widgets`; `col` / `row` / `label` are small Storybook layout helpers.

### ProgressProps

`ui.widgets.Progress`

[src/ui/components/progress/mod.zig:43](https://github.com/version-next/zenit/blob/HEAD/src/ui/components/progress/mod.zig#L43)

```zig
fn Progress(props: ProgressProps) ProgressBuilder
```

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `value` | `f32` | `0` | 当前值 (0-100) |
| `status` | `ProgressStatus` `.normal` `.success` `.@"error"` | `.normal` | 状态 |
| `height` | `f32` | `4` | 轨道高度 |
| `show_text` | `bool` | `false` | 显示百分比文本 |
| `indeterminate` | `bool` | `false` | 不确定模式 |
| `width` | `?f32` | `null` | 总宽度 (null = grow) |

### \*Node

`ui.widgets.Progress`

mount returns `*Node` directly. Append it to a parent.
