formswitch

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Switch

func Switch(p SwitchProps) templ.Component

Switch renders input[type=checkbox] with switch role attrs.

func SwitchClasses

func SwitchClasses(p SwitchProps) string

Types

type SwitchProps

type SwitchProps struct {
	Variant   string
	Size      string
	Class     string
	Name      string
	Value     string
	Checked   bool
	Disabled  bool
	Required  bool
	ID        string
	Role      string
	TabIndex  string
	AriaLabel string
	Attrs     templ.Attributes
}

SwitchProps configures a toggle input.

Jump to

Keyboard shortcuts

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