Documentation
¶
Overview ¶
Package progress provides a thin wrapper around the native <progress> element with theme-aware styling.
Two variants:
- Determinate — Value/Max are set; bar fills proportionally.
- Indeterminate — Value < 0; the browser shows its native animated "in progress" stripe.
The component is server-rendered and does not require JavaScript. Drive updates from the server via a signal binding (data-fui-signal-attr=value) when you want a live progress bar without a page reload.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Style = registry.RegisterStyle("progress", styleFn)
Style is the registered stylesheet handle. New's wrapping <div> goes through Style.WrapHTML so the data-fui-comp marker is emitted and the runtime auto-loads the CSS on first appearance.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Value is the current progress, between 0 and Max. A negative
// Value renders an indeterminate (animated) bar.
Value float64
Max float64 // defaults to 100 when zero
// Label is the accessible name. Required for screen readers.
Label string
// Description optionally renders alongside the bar (e.g. "73 of 100"
// or "Uploading file…"). Empty = no description rendered.
Description string
ID string
Class string
}
Config configures a progress bar.
Click to show internal directories.
Click to hide internal directories.