Packages
pui
1.0.2
1.0.2
1.0.1
1.0.0
1.0.0-beta.18
retired
1.0.0-beta.17
retired
1.0.0-beta.16
retired
1.0.0-beta.15
retired
1.0.0-beta.14
retired
1.0.0-beta.13
retired
1.0.0-beta.12
retired
1.0.0-beta.11
retired
1.0.0-beta.10
retired
1.0.0-beta.9
retired
1.0.0-beta.8
retired
1.0.0-beta.7
retired
1.0.0-beta.6
retired
1.0.0-beta.5
retired
1.0.0-beta.4
retired
1.0.0-beta.3
retired
1.0.0-beta.1
retired
1.0.0-alpha.32
retired
1.0.0-alpha.31
retired
1.0.0-alpha.30
retired
1.0.0-alpha.29
retired
1.0.0-alpha.28
retired
1.0.0-alpha.27
retired
1.0.0-alpha.26
retired
1.0.0-alpha.25
retired
1.0.0-alpha.24
retired
1.0.0-alpha.23
retired
1.0.0-alpha.22
retired
1.0.0-alpha.21
retired
1.0.0-alpha.19
retired
1.0.0-alpha.18
retired
1.0.0-alpha.17
retired
1.0.0-alpha.16
retired
1.0.0-alpha.15
retired
1.0.0-alpha.14
retired
1.0.0-alpha.13
retired
1.0.0-alpha.12
retired
1.0.0-alpha.11
retired
A Phoenix LiveView UI toolkit
Current section
Files
Jump to
Current section
Files
guides/progress.md
# PUI.Progress
`PUI.Progress` renders an accessible progress bar for completion and loading
states. The host LiveView owns the value and can update it through assigns.
## Usage
```heex
<.progress value={42} label="Upload progress" />
<.progress value={3} min={0} max={10} value_text="3 of 10 items" />
<.progress value={75} class="h-3" />
```
## LiveView updates
```elixir
def handle_info({:upload_progress, value}, socket) do
{:noreply, assign(socket, upload_progress: value)}
end
```
```heex
<.progress value={@upload_progress} label="Upload progress" />
```
## Attributes
| Name | Type | Default | Description |
|------|------|---------|-------------|
| `min` | `float` | `0.0` | Minimum progress value |
| `max` | `float` | `100.0` | Maximum progress value |
| `value` | `float` | `0.0` | Current progress value |
| `label` | `string` | `nil` | Accessible label for the progressbar |
| `aria_labelledby` | `string` | `nil` | ID of an element labelling the progressbar |
| `value_text` | `string` | `nil` | Human-readable value announced by screen readers |
| `class` | `string` | `""` | Additional CSS classes |
The canonical module is `PUI.Progress`. Existing
`PUI.Components.progress/1` calls remain available as deprecated compatibility
wrappers.