utils

package
v0.0.0-...-c353a36 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package utils exposes class composition helpers, ARIA templ attributes, and allowed HTML tag guards.

Styled variant helpers belong in github.com/fastygo/ui8kit/utils, not here.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AriaChecked

func AriaChecked(checked bool) templ.Attributes

func AriaControls

func AriaControls(id string) templ.Attributes

func AriaCurrent

func AriaCurrent(value string) templ.Attributes

func AriaDescribedBy

func AriaDescribedBy(id string) templ.Attributes

func AriaDisabled

func AriaDisabled(disabled bool) templ.Attributes

func AriaExpanded

func AriaExpanded(expanded bool) templ.Attributes

func AriaHasPopup

func AriaHasPopup(kind string) templ.Attributes

func AriaHidden

func AriaHidden(hidden bool) templ.Attributes

func AriaLabel

func AriaLabel(label string) templ.Attributes

func AriaLabelledBy

func AriaLabelledBy(id string) templ.Attributes

func AriaLive

func AriaLive(mode string) templ.Attributes

func AriaModal

func AriaModal(modal bool) templ.Attributes

func AriaPressed

func AriaPressed(pressed bool) templ.Attributes

func AriaRequired

func AriaRequired(required bool) templ.Attributes

func AriaSelected

func AriaSelected(selected bool) templ.Attributes

func Cn

func Cn(classes ...string) string

Cn joins non-empty class fragments with a single space.

func IsAllowedTag

func IsAllowedTag(tag string, group TagGroup) bool

func MergeAttrs

func MergeAttrs(groups ...templ.Attributes) templ.Attributes

func ResolveTag

func ResolveTag(tag, fallback string, group TagGroup) string

Types

type TagGroup

type TagGroup int
const (
	TagGroupLayout TagGroup = iota
	TagGroupBlockText
	TagGroupInline
	TagGroupHeading
	TagGroupList
	TagGroupListItem
	TagGroupForm
	TagGroupFormControl
	TagGroupFormLabel
	TagGroupTable
	TagGroupTableSection
	TagGroupTableRow
	TagGroupTableCell
	TagGroupTableColumn
	TagGroupMedia
	TagGroupDisclosure
	TagGroupStack
	TagGroupGroup
	TagGroupText
	TagGroupContainer
)

Jump to

Keyboard shortcuts

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