toggles

package
v0.0.0-...-b42d0f1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 4 Imported by: 0

README

Toggle Elements

Copy this package as source when an application needs theme or language toggles.

Copy:

  • toggles.templ

Do not copy generated files:

  • *_templ.go

After copying, run templ generate ./... and .ui8px checks in the destination app.

The package depends only on UI8Kit.

Documentation

Overview

Package toggles contains reusable header toggle controls.

templ: version: v0.3.1001

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DarkModeToggle

func DarkModeToggle(props DarkModeToggleProps) templ.Component

func HeaderLanguageToggle

func HeaderLanguageToggle(props HeaderLanguageToggleProps) templ.Component

func LanguageToggle

func LanguageToggle(props LanguageToggleProps) templ.Component

Types

type DarkModeToggleProps

type DarkModeToggleProps struct {
	ID                 string
	IconID             string
	Label              string
	SwitchToDarkLabel  string
	SwitchToLightLabel string
}

type HeaderLanguageToggleProps

type HeaderLanguageToggleProps struct {
	Toggle LanguageToggleProps
}

type LanguageToggleProps

type LanguageToggleProps struct {
	ID               string
	Href             string
	DefaultLocale    string
	CurrentLocale    string
	CurrentLabel     string
	NextLocale       string
	NextLabel        string
	AvailableLocales []string
	EnhanceWithJS    bool
	SPATarget        string
}

Jump to

Keyboard shortcuts

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