Documentation
¶
Index ¶
- func For(forID string, str string) *element
- func New(nodes ...node.Node) *element
- func NewLabel(forID string, 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
- type Element
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func For ¶
For Creates a new label element with for attribute and text content (HTML-encoded) Example: label.For("email", "Email Address") Renders: <label for="email">Email Address</label>
func New ¶
New Creates a new label element with child nodes. Example: label.New() Renders: <label></label>
func NewLabel ¶
NewLabel Creates a new label element with for attribute and child nodes. Example: label.NewLabel("email") Renders: <label for="email"></label>
func RawText ¶
func RawText(str string) *element
RawText Creates a new label element with raw text content as unescaped HTML Example: label.RawText("Email <em>Address</em>") Renders: <label>Email <em>Address</em></label>
func RawTextf ¶
RawTextf Creates a new label element with formatted raw text content as unescaped HTML using text.RawTextf. Example: label.RawTextf("Hello <em>%s</em>", "World") Renders: <label>Hello <em>World</em></label>
func Static ¶
func Static(str string) *element
Static Creates a new label element with static text content Example: label.Static("Email Address") Renders: <label>Email Address</label>