Actions
Button
Typed submit, reset and native command buttons.
components.Button · ButtonProps
Preview
Open standalone preview →Use it well.
Native HTMX fields are optional. Set Type explicitly for forms; FormNoValidate supports Back actions. Native overlay targets force type=button.
Explore the full demo →Templ example
Download example.templThis is the source compiled for the preview. Select the text to copy it, or download the file. Change the package name and demo routes for your application.
package examples
import "github.com/Tend-Stack/GothUI/v2026/components"
templ ExampleButton() {
<form action="/catalog" method="get">
<input type="hidden" name="q" value="button"/>
@components.Button(components.ButtonProps{Text: "Find button examples", Type: components.ButtonTypeSubmit, IconBefore: components.IconSearch})
</form>
}