---
url: /tui.zig/guide/widgets/progress-bar.md
---
# Progress Bar Widget

Visualizes progress of a task.

## Import

```zig
const tui = @import("tui");
const ProgressBar = tui.ProgressBar;
```

## Usage

```zig
var p = ProgressBar.init();
p.setValue(0.5); // 50%
```

## Options

* `withLabel("Loading...")`: Text label
* `withShowPercentage(bool)`: Display partial percentage
* `withStyle(style)`: Bar color

## Value Range

Value should be between `0.0` (empty) and `1.0` (full).
