button

package
v0.0.39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

templ: version: v0.3.977

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Button

func Button(props ...Props) templ.Component

Types

type Props

type Props struct {
	ID         string
	Class      string
	Attributes templ.Attributes
	Variant    Variant
	Size       Size
	Disabled   bool
	OnClick    string
}

type Size

type Size string
const (
	SizeDefault Size = ""
	SizeLg      Size = "btn-lg"
	SizeMd      Size = "btn-md"
	SizeSm      Size = "btn-sm"
	SizeXs      Size = "btn-xs"
)

type Variant

type Variant string
const (
	VariantDefault   Variant = ""
	VariantPrimary   Variant = "btn-primary"
	VariantSecondary Variant = "btn-secondary"
	VariantAccent    Variant = "btn-accent"
	VariantInfo      Variant = "btn-info"
	VariantSuccess   Variant = "btn-success"
	VariantWarning   Variant = "btn-warning"
	VariantError     Variant = "btn-error"
	VariantGhost     Variant = "btn-ghost"
	VariantLink      Variant = "btn-link"
	VariantOutline   Variant = "btn-outline"
	VariantNeutral   Variant = "btn-neutral"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL