progress

package
v1.0.31-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package progress provides a determinate progress bar.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProgressElement

type ProgressElement struct {
	// Contextual gives it a context menu (Context).
	elements.Contextual

	kit.HoverTracker
	// contains filtered or unexported fields
}

ProgressElement is the bar: a rounded track box holding a row of the fill and the rest, sized by flex growth in proportion to the value.

func Progress

func Progress(value float32, st ...styles.Styles) *ProgressElement

Progress is a stateless determinate progress bar. It expands to the available width; the height defaults to 8px. Color is the fill and Background is the track. Chain OnHover to add hover styles.

func (*ProgressElement) Label

func (p *ProgressElement) Label(s string) *ProgressElement

Label names the bar for screen readers ("Uploading report.pdf"), which read its value as a percentage. It returns p for chaining.

func (*ProgressElement) Layout

Layout lays the bar out.

func (*ProgressElement) OnHover

func (p *ProgressElement) OnHover(st styles.Styles) *ProgressElement

OnHover sets styles applied while the pointer is over the bar, merged on top of its base styles. Hover state lives in the element, so create it once and reuse it every frame; rebuilding it in the view function resets the hover on each frame.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL