button

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package button provides HTML button components with flexible props. The Props type defines attributes for the component, including Hx, Aria, and Data props. If Href is set, the component renders as an <a> tag; otherwise, it renders as a <button> tag.

Copyright 2025 Deirror. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Button

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

Types

type Props

type Props struct {
	props.Attrs

	Hx   htmx.Props
	Aria aria.Props
	Data data.Props

	Disabled bool
	Href     string
	Type     string
}

func (Props) AsTemplAttrs

func (p Props) AsTemplAttrs() templ.Attributes

Jump to

Keyboard shortcuts

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