ui

package
v0.0.0-...-6a13fbe Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

Index

Constants

View Source
const (
	AlertInfo = iota
	AlertWarning
	AlertError
	AlertSuccess
)

Variables

View Source
var (
	IconSmall  = templ.Attributes{"class": "icon_small"}
	IconNormal = templ.Attributes{"class": "icon_normal"}
	IconLarge  = templ.Attributes{"class": "icon_large"}
)
View Source
var ButtonTypeClass = map[ButtonType]string{
	ButtonTypePrimary:   "primary",
	ButtonTypeSecondary: "secondary",
	ButtonTypeAccent:    "accent",
	ButtonTypeIcon:      "icon",
	ButtonTypeGhost:     "ghost",
	ButtonTypeDanger:    "danger",
}
View Source
var InputTypeMap = map[InputType]string{
	InputTypeText:   "text",
	InputTypeNumber: "number",
}
View Source
var PositionClassMap = map[Position]string{
	PositionStart:  "start",
	PositionMiddle: "middle",
	PositionEnd:    "end",
}
View Source
var StatusDotClassMap = map[StatusDotType]string{
	StatusDotSuccess: "success",
	StatusDotError:   "error",
}
View Source
var ToastTypeClassMap = map[ToastType]string{
	ToastTypeSuccess: "success",
	ToastTypeError:   "error",
	ToastTypeInfo:    "info",
	ToastTypeWarning: "warning",
}

Functions

func Alert

func Alert(t AlertType) templ.Component

func AlertDescription

func AlertDescription() templ.Component

func AlertTitle

func AlertTitle() templ.Component

func Button

func Button(t ButtonType, attr ...templ.Attributes) templ.Component
func ButtonLink(t ButtonType, href string, attr ...templ.Attributes) templ.Component

func ButtonRow

func ButtonRow(align ...Align) templ.Component

func Card

func Card(attr ...templ.Attributes) templ.Component

func CardBody

func CardBody(attr ...templ.Attributes) templ.Component

func CardDescription

func CardDescription(attr ...templ.Attributes) templ.Component

func CardTitle

func CardTitle(attr ...templ.Attributes) templ.Component

func CodeInput

func CodeInput(name string, n int) templ.Component

func CopyButton

func CopyButton(text string) templ.Component

func FirstLetterToUppercase

func FirstLetterToUppercase(s string) string

func FormFields

func FormFields() templ.Component

func FullPageCard

func FullPageCard() templ.Component

func Input

func Input(label, name string, attr ...templ.Attributes) templ.Component

func KVInput

func KVInput(label, name, placeholderK, placeholderV string, values map[string]string) templ.Component

func LoadingIndicator

func LoadingIndicator() templ.Component
func Modal(id string) templ.Component

func ModalCloseAttr

func ModalCloseAttr() templ.Attributes

func ModalCloseButton

func ModalCloseButton() templ.Component

func ModalOpenAttr

func ModalOpenAttr(id string) templ.Attributes

func MultiInput

func MultiInput(label, name string, t InputType, values []string, inputAttrs ...templ.Attributes) templ.Component

func ShowTab

func ShowTab(id string, attr ...templ.Attributes) templ.Attributes
func Sidebar() templ.Component

func SidebarContainer

func SidebarContainer() templ.Component

Wraps the sidebar and your page content

func SidebarContent

func SidebarContent() templ.Component

func SidebarHeader

func SidebarHeader() templ.Component
func SidebarLinks(links []SidebarLink, currentPath ...string) templ.Component

func StatusDot

func StatusDot(t StatusDotType) templ.Component

func Table

func Table() templ.Component

func TableHead

func TableHead(hs ...string) templ.Component

func TextInput

func TextInput(attributes ...templ.Attributes) templ.Component

func Toast

func Toast(t ToastType) templ.Component

func ToastContainer

func ToastContainer(x Position, y Position) templ.Component

Types

type AlertType

type AlertType int32

type Align

type Align int
const (
	AlignLeft Align = iota
	AlignCenter
	AlignRight
	AlignBetween
)

type ButtonType

type ButtonType int
const (
	ButtonTypePrimary ButtonType = iota
	ButtonTypeSecondary
	ButtonTypeAccent
	ButtonTypeIcon
	ButtonTypeGhost
	ButtonTypeDanger
)

type InputType

type InputType uint32
const (
	InputTypeText InputType = iota
	InputTypeNumber
)

type Position

type Position uint16
const (
	PositionStart Position = iota
	PositionMiddle
	PositionEnd
)
type SidebarLink struct {
	Icon   templ.Component
	Name   string
	LinkTo string
}

type StatusDotType

type StatusDotType uint16
const (
	StatusDotSuccess StatusDotType = iota
	StatusDotError
)

type ToastType

type ToastType uint16
const (
	ToastTypeSuccess ToastType = iota
	ToastTypeError
	ToastTypeInfo
	ToastTypeWarning
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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