Documentation
¶
Index ¶
- func New(nodes ...node.Node) *element
- func RawText(str string) *element
- func RawTextf(format string, args ...any) *element
- func Static(str string) *element
- func Text(str string) *element
- func Textf(format string, args ...any) *element
- func ValueMax(value float64, max float64, nodes ...node.Node) *element
- type Element
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
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 ¶
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>