Segmented Process
A multi-segment progress bar for showing how a total breaks down into parts, with per-segment tooltips and optional threshold markers.
Unstable: this component's API may still change between releases. Depend on it, but expect to update call sites on upgrade.
Installation
import "github.com/kerkenes/templ-ui/components/segmentedprocess"Load the script once in your layout:
<head>
@segmentedprocess.Script()
</head>Examples
Thresholds
Domain Compress
DomainCompress: false
DomainCompress: true
Custom Height
API Reference
SegmentedProcess
Multi-segment progress bar with per-segment tooltips and threshold markers.
| Name | Type | Default |
|---|---|---|
Unique identifier for the root element. | | - |
Additional CSS classes to apply to the root element. | | - |
Additional HTML attributes to apply to the root element. | | - |
Segments stacked left to right. Each has a Label and a Value; color cycles through the chart palette by position. | | - |
The domain the bar represents 100% of, unless DomainCompress overrides it. | | |
Optional target markers drawn above the bar. Each has a Value, Label, and Variant ('default', 'success', 'danger', 'warning'). | | - |
Scale the bar's visual domain to the last threshold (placed at 90% of the bar's width) instead of Max. Ignored without thresholds. | | |
Appended to displayed values, e.g. 'GB'. | | - |
Bar height in pixels. | | |
Overrides the generated "X of Y unit used" summary read by screen readers. | | - |