Documentation
¶
Overview ¶
Package progressbar renders a determinate progress indicator with an optional label, percentage readout, and color-tunable fill.
Progress bars are pure render: the caller updates Percent() and the bar redraws. There is no internal animation or tick; pair with the spinner component if you need an indeterminate indicator.
Index ¶
- type Bar
- func (b Bar) Percent() float64
- func (b Bar) View() string
- func (b Bar) WithFillColor(c lipgloss.Color) Bar
- func (b Bar) WithLabel(label string) Bar
- func (b Bar) WithPercent(p float64) Bar
- func (b Bar) WithPercentDisplay(show bool) Bar
- func (b Bar) WithRunes(fill, empty string) Bar
- func (b Bar) WithWidth(w int) Bar
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bar ¶
type Bar struct {
// contains filtered or unexported fields
}
Bar is a determinate progress indicator.
func (Bar) WithFillColor ¶
WithFillColor overrides the fill color. Useful for status bars where you want a Success/Warning/Error-tinted progress strip.
func (Bar) WithPercent ¶
WithPercent sets the fill ratio. Values are clamped into [0, 1].
func (Bar) WithPercentDisplay ¶
WithPercent display toggle. Default is on.
Click to show internal directories.
Click to hide internal directories.
