uiForm

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2025 License: MIT Imports: 2 Imported by: 1

Documentation

Overview

templ: version: v0.3.898

templ: version: v0.3.898

templ: version: v0.3.898

templ: version: v0.3.898

templ: version: v0.3.898

Index

Constants

View Source
const (
	InputTypeColor    string = "color"
	InputTypeDate     string = "date"
	InputTypeEmail    string = "email"
	InputTypeHidden   string = "hidden"
	InputTypeMonth    string = "month"
	InputTypeNumber   string = "number"
	InputTypePassword string = "password"
	InputTypeTel      string = "tel"
	InputTypeText     string = "text"
	InputTypeTime     string = "time"
	InputTypeUrl      string = "url"

	InputTypeHintDisplayTooltip     string = "tooltip"
	InputTypeHintDisplayDescription string = "description"
)
View Source
const (
	RadioInputSizeXs string = "xs"
	RadioInputSizeSm string = "sm"
	RadioInputSizeMd string = "md"
	RadioInputSizeLg string = "lg"
	RadioInputSizeXl string = "xl"
)
View Source
const (
	SelectInputSizeXs string = "xs"
	SelectInputSizeSm string = "sm"
	SelectInputSizeMd string = "md"
	SelectInputSizeLg string = "lg"
	SelectInputSizeXl string = "xl"
)
View Source
const (
	TextAreaSizeXs = "xs"
	TextAreaSizeSm = "sm"
	TextAreaSizeMd = "md"
	TextAreaSizeLg = "lg"
	TextAreaSizeXl = "xl"
)

Variables

This section is empty.

Functions

func InlineRadioGroup

func InlineRadioGroup(componentSettings InlineRadioGroupSettings) templ.Component

func InputField

func InputField(componentSettings InputFieldSettings) templ.Component

func RadioInput

func RadioInput(componentSettings RadioInputSettings) templ.Component

func SelectInput

func SelectInput(componentSettings SelectInputSettings) templ.Component

func TextArea

func TextArea(componentSettings TextAreaSettings) templ.Component

Types

type InlineRadioGroupSettings

type InlineRadioGroupSettings struct {
	Label         string
	InputSettings []RadioInputSettings

	// OptionalFields
	TwoWayStatePath string
	InputId         string
	InputName       string
}

type InputFieldSettings

type InputFieldSettings struct {
	InputType string
	InputName string
	Label     string

	// OptionalFields
	TwoWayStatePath                   string
	Value                             string
	AffixLeftValue                    string
	AffixLeftStatePath                string
	AffixRightValue                   string
	AffixRightStatePath               string
	InputId                           string
	InputNumberMin                    string
	InputNumberMax                    string
	InputNumberStep                   string
	IsRequired                        bool
	IsReadOnly                        bool
	HintValue                         string
	HintStatePath                     string
	HintDisplay                       string
	HintDisplayTooltipBackgroundColor string
}

type RadioInputSettings

type RadioInputSettings struct {
	Label           string
	StateValue      string
	TwoWayStatePath string

	// OptionalFields
	InputId   string
	InputName string
	Size      string
}

type SelectInputSettings

type SelectInputSettings struct {
	InputName string
	Label     string

	// OptionalFields
	FlatOptions              []string
	LabelValueOptions        []SelectLabelValueOption
	TwoWayStatePath          string
	OnChangeFunc             string
	Size                     string
	DropdownBackgroundColor  string
	InputId                  string
	IsRequired               bool
	ShouldIncludeBlankOption bool
}

type SelectLabelValueOption

type SelectLabelValueOption struct {
	Label     string          `json:"label"`
	LabelHtml templ.Component `json:"-"`
	Value     string          `json:"value"`
}

type TextAreaSettings

type TextAreaSettings struct {
	Label string

	// OptionalFields
	InputId         string
	InputName       string
	Size            string
	TwoWayStatePath string
	Value           string
	IsCode          bool
	IsReadOnly      bool
	IsRequired      bool
}

Jump to

Keyboard shortcuts

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