Button

Interactive element that triggers actions when clicked.

Source Tailwind

Installation

templui add button

Examples

Sizes

Primary

Secondary

Destructive

Outline

Ghost

Icon

With Icon

Loading

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
default
FullWidth
bool
false
Href
string
-
Target
string
-
Disabled
bool
false
Type
Type
button