functions
Button| modified | Sunday 25 January 2026 |
|---|
Category: Components
File: form.go
Package: ui
1func Button(clickable *Clickable, label string) W
Button creates a clickable button widget with accent colors and hover effects.
The button automatically responds to mouse hover by lightening its background.
Example:
btn := &Clickable{}
button := Button(btn, "Click Me")
if btn.Clicked(gtx) {
// Handle click event
}
The clickable state is managed by the provided Clickable pointer.
1{
2 btn := &Clickable{}
3 _ = Button(btn, "Click Me")
4}

This documentation is auto-generated. To update, run make docs