Documentation
¶
Overview ¶
templ: version: v0.3.1001
Package button renders a native button element or SafeURL anchor — no presets, Class/Attrs slots only.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Button ¶
func Button(props ButtonProps, label string) templ.Component
Example ¶
package main
import (
"bytes"
"context"
"fmt"
"github.com/fastygo/base/button"
)
func main() {
var buf bytes.Buffer
cmp := button.Button(button.ButtonProps{Class: "actions-primary"}, "Save")
if err := cmp.Render(context.Background(), &buf); err != nil {
panic(err)
}
fmt.Print(buf.String())
}
Output: <button type="button" class="actions-primary">Save</button>
func ButtonBlock ¶
func ButtonBlock(props ButtonProps) templ.Component
Types ¶
Click to show internal directories.
Click to hide internal directories.