button

package
v0.0.0-...-8815ff5 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

templ: version: v0.3.960

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Button

func Button(args ButtonArgs) templ.Component

Types

type ButtonArgs

type ButtonArgs struct {
	// Variant defines the visual style of the button
	// Options: "default", "destructive", "outline", "secondary", "ghost", "link"
	Variant string

	// Size defines the size of the button
	// Options: "default", "sm", "lg", "icon"
	Size string

	// AsChild renders the button as a child element (for composition)
	AsChild bool

	// Class allows additional CSS classes to be added
	Class string

	// Attributes allows additional HTML attributes to be added
	Attributes templ.Attributes

	// Disabled makes the button non-interactive
	Disabled bool

	// Type specifies the button type (button, submit, reset)
	Type string
}

ButtonArgs defines the properties for the Button component

Jump to

Keyboard shortcuts

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