toggle

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: 3 Imported by: 0

Documentation

Overview

templ: version: v0.3.977

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Toggle

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

Types

type Props

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

type Size

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

type Variant

type Variant string
const (
	VariantDefault   Variant = ""
	VariantPrimary   Variant = "toggle-primary"
	VariantSecondary Variant = "toggle-secondary"
	VariantAccent    Variant = "toggle-accent"
	VariantNeutral   Variant = "toggle-neutral"
	VariantSuccess   Variant = "toggle-success"
	VariantWarning   Variant = "toggle-warning"
	VariantInfo      Variant = "toggle-info"
	VariantError     Variant = "toggle-error"
)

Jump to

Keyboard shortcuts

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