progress

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(nodes ...node.Node) *element

New Creates a new progress element with optional child nodes for fallback content. Example: progress.New() Renders: <progress></progress>

func RawText

func RawText(content string) *element

RawText Creates a new progress element with raw text content as unescaped HTML for fallback. Example: progress.RawText("<span>50%</span>") Renders: <progress><span>50%</span></progress>

func RawTextf

func RawTextf(format string, args ...any) *element

RawTextf Creates a new progress element with formatted raw text content as unescaped HTML for fallback. Example: progress.RawTextf("<strong>%d%%</strong>", 50) Renders: <progress><strong>50%</strong></progress>

func Static

func Static(content string) *element

Static Creates a new progress element with static text content for fallback. Example: progress.Static("Loading") Renders: <progress>Loading</progress>

func Text

func Text(content string) *element

Text Creates a new progress element with text content (HTML-encoded) for fallback. Example: progress.Text("50% complete") Renders: <progress>50% complete</progress>

func Textf

func Textf(format string, args ...any) *element

Textf Creates a new progress element with formatted text content (HTML-encoded) for fallback. Example: progress.Textf("%d%% complete", 50) Renders: <progress>50% complete</progress>

func ValueMax

func ValueMax(value float64, max float64, nodes ...node.Node) *element

ValueMax Creates a new progress element with value and max attributes set. Example: progress.ValueMax(75, 100) Renders: <progress value="75" max="100"></progress>

Types

type Element

type Element = element

Element is an exported alias for the private element type

Jump to

Keyboard shortcuts

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