templUI Pro coming soon  

50% OFF Join Waitlist

Button

Interactive element that triggers actions when clicked.

Source
TailwindCSS

Installation

templui add button

Examples

Primary

Secondary

Destructive

Outline

Ghost

Icon

With Icon

Loading

HTMX Loading (5s)

API Reference

Required parameter
Hover for description

Button

Interactive button component with multiple variants and states.

Name Type Default
ID
string
-
Class
string
-
Attributes
templ.Attributes
-
Variant
Variant
default
Size
Size
-
FullWidth
bool
false
Href
string
-
Target
string
-
Disabled
bool
false
Type
Type
button