Documentation
¶
Overview ¶
templ: version: v0.2.793
Package components contains reusable Templ components.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EmbedStatic embed.FS
Functions ¶
func Button ¶
func Button(props ButtonProps) templ.Component
func ServeStaticFiles ¶
Serve the Apollo static files using the specified server at the specified endpoint. Applications should import the following files in the HTML header:
<link href="/<endpoint>/apollo.css" rel="stylesheet" defer/>
When using a local version of Apollo, you can set the APOLLO_STATIC_FILES environment variable to hot reload library styles.
Types ¶
type ButtonProps ¶
type ButtonProps struct {
// The semantic button type, different types will have consistently different visual styles
Type ButtonType `default:"ButtonType_Primary"`
// The HTML button type
HtmlType HtmlType `default:"HtmlType_Button"`
// If set, clicking the button will trigger a htmx get request
HxGet string
// If set, the button will become a standalone, full-width button
Block bool
// If set, the button will function as a link
Link bool
// If set, the button will be disabled
Disabled bool
// Additional class(es) to append to the button element
Class string
// Additional attributes that will be added to the button element
Attrs templ.Attributes
}
type ButtonType ¶
type ButtonType int
const ( ButtonType_Primary ButtonType = iota ButtonType_Secondary ButtonType_Accent ButtonType_Inverted ButtonType_Danger )
Click to show internal directories.
Click to hide internal directories.