checkbox

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 Checkbox

func Checkbox(args CheckboxArgs) templ.Component

Checkbox renders a checkbox input with shadcn/ui styling and internal Datastar reactivity

func CheckboxIndicator

func CheckboxIndicator(args CheckboxIndicatorArgs) templ.Component

CheckboxIndicator renders the checkbox indicator (check mark)

Types

type CheckboxArgs

type CheckboxArgs struct {
	// Core HTML attributes
	ID       string
	Name     string
	Value    string
	Checked  bool
	Disabled bool
	Required bool

	// Styling
	ClassName string

	// Accessibility
	AriaLabel       string
	AriaLabelledBy  string
	AriaDescribedBy string
	AriaInvalid     bool

	// Additional HTML attributes
	Attributes templ.Attributes
}

CheckboxArgs defines the properties for the Checkbox component

type CheckboxIndicatorArgs

type CheckboxIndicatorArgs struct {
	// Styling
	ClassName string

	// Additional HTML attributes
	Attributes templ.Attributes
}

CheckboxIndicatorArgs defines the properties for the CheckboxIndicator component

type CheckboxSignals

type CheckboxSignals struct {
	Checked  bool `json:"checked"`
	Disabled bool `json:"disabled"`
}

CheckboxSignals defines the signal structure for checkbox components

Jump to

Keyboard shortcuts

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