meter

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 meter element with optional child nodes Example: meter.New() Renders: <meter></meter>

func RawText

func RawText(str string) *element

RawText Creates a new meter element with raw text content Example: meter.RawText("6 out of 10") Renders: <meter>6 out of 10</meter>

func RawTextf

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

RawTextf Creates a new meter element with formatted raw text content as unescaped HTML. Example: meter.RawTextf("<strong>%d</strong> out of %d", 6, 10) Renders: <meter><strong>6</strong> out of 10</meter>

func Static

func Static(str string) *element

Static Creates a new meter element with static text content. Example: meter.Static("Hello World") Renders: <meter>Hello World</meter>

func Text

func Text(str string) *element

Text Creates a new meter element with text content (fallback text) Example: meter.Text("6 out of 10") Renders: <meter>6 out of 10</meter>

func Textf

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

Textf Creates a new meter element with formatted text content (HTML-encoded). Example: meter.Textf("%d out of %d", 6, 10) Renders: <meter>6 out of 10</meter>

func ValueMax

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

ValueMax Creates a new meter element with value and max attributes Example: meter.ValueMax(6, 10) Renders: <meter value="6" max="10"></meter>

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