Documentation
¶
Index ¶
- func Button(str string) *element
- func New(nodes ...node.Node) *element
- func RawText(str string) *element
- func RawTextf(format string, args ...any) *element
- func Reset(str string) *element
- func Static(str string) *element
- func Submit(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 Button ¶
func Button(str string) *element
Button Creates a generic button with text content Example: button.Button("Click Me") Renders: <button type="button">Click Me</button>
func New ¶
New Creates a new button element with the given child nodes. Example: button.New(text.Text("Click Me")) Renders: <button>Click Me</button>
func RawText ¶
func RawText(str string) *element
RawText Creates a new button element with raw text content as unescaped HTML. Example: button.RawText("<b>Submit</b>") Renders: <button><b>Submit</b></button>
func RawTextf ¶
RawTextf Creates a new button element with formatted raw text content as unescaped HTML using text.RawTextf. Example: button.RawTextf("Hello <em>%s</em>", "World") Renders: <button>Hello <em>World</em></button>
func Reset ¶
func Reset(str string) *element
Reset Creates a reset button with text content Example: button.Reset("Clear Form") Renders: <button type="reset">Clear Form</button>
func Static ¶
func Static(str string) *element
Static Creates a new button element with static text content. Example: button.Static("<b>Submit</b>") Renders: <button><b>Submit</b></button>
func Submit ¶
func Submit(str string) *element
Submit Creates a submit button with text content Example: button.Submit("Send Form") Renders: <button type="submit">Send Form</button>