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
Index ¶
- Constants
- func InlineRadioGroup(componentSettings InlineRadioGroupSettings) templ.Component
- func InputField(componentSettings InputFieldSettings) templ.Component
- func InputHintDescription(componentSettings InputHintSettings) templ.Component
- func InputHintTooltip(componentSettings InputHintSettings) templ.Component
- func MultiSelectInput(componentSettings MultiSelectInputSettings) templ.Component
- func RadioInput(componentSettings RadioInputSettings) templ.Component
- func SelectInput(componentSettings SelectInputSettings) templ.Component
- func TextArea(componentSettings TextAreaSettings) templ.Component
- func ToggleSwitch(componentSettings ToggleSwitchSettings) templ.Component
- type InlineRadioGroupSettings
- type InputFieldSettings
- type InputHintSettings
- type MultiSelectInputSettings
- type RadioInputSettings
- type SelectInputSettings
- type SelectLabelValueOption
- type TextAreaSettings
- type ToggleSwitchSettings
Constants ¶
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" )
const ( InputHintDisplayTooltip string = "tooltip" InputHintDisplayDescription string = "description" InputHintSizeSm string = "sm" InputHintSizeLg string = "lg" InputHintIconStylePlain string = "plain" InputHintIconStyleBoxed string = "boxed" )
const ( RadioInputSizeXs string = "xs" RadioInputSizeSm string = "sm" RadioInputSizeMd string = "md" RadioInputSizeLg string = "lg" RadioInputSizeXl string = "xl" )
const ( SelectInputSizeXs string = "xs" SelectInputSizeSm string = "sm" SelectInputSizeMd string = "md" SelectInputSizeLg string = "lg" SelectInputSizeXl string = "xl" )
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 InputHintDescription ¶ added in v0.2.0
func InputHintDescription(componentSettings InputHintSettings) templ.Component
func InputHintTooltip ¶ added in v0.2.0
func InputHintTooltip(componentSettings InputHintSettings) templ.Component
func MultiSelectInput ¶ added in v0.1.7
func MultiSelectInput(componentSettings MultiSelectInputSettings) 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
func ToggleSwitch ¶ added in v0.1.8
func ToggleSwitch(componentSettings ToggleSwitchSettings) templ.Component
ToggleSwitch supports two Alpine.js binding modes:
Boolean mode: Set TwoWayStatePath to a boolean property and leave CustomValue empty. Example: x-data="{enabled: false}", TwoWayStatePath: "enabled".
Array mode: Set TwoWayStatePath to an array property and set CustomValue to one item. Alpine.js adds the value when checked and removes it when unchecked. Render one switch for each item, using the same path and a different value. Example: x-data="{channels: ['email']}", TwoWayStatePath: "channels", CustomValue: "sms".
Set InputName to include the bound state in form submission.
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
HintIconStyle string
}
type InputHintSettings ¶ added in v0.2.0
type MultiSelectInputSettings ¶ added in v0.1.7
type MultiSelectInputSettings struct {
InputName string
Label string
// OptionalFields
FlatOptions []string
LabelValueOptions []SelectLabelValueOption
TwoWayStatePath string
InputId string
IsRequired bool
DropdownBackgroundColor string
HintValue string
HintStatePath string
HintDisplay string
HintDisplayTooltipBackgroundColor string
HintIconStyle string
}
type RadioInputSettings ¶
type SelectInputSettings ¶
type SelectInputSettings struct {
InputName string
Label string
// OptionalFields
FlatOptions []string
LabelValueOptions []SelectLabelValueOption
TwoWayStatePath string
OnChangeFunc string
Size string
DropdownBackgroundColor string
IsRequired bool
ShouldIncludeBlankOption bool
HintValue string
HintStatePath string
HintDisplay string
HintDisplayTooltipBackgroundColor string
HintIconStyle string
}
type SelectLabelValueOption ¶
type TextAreaSettings ¶
type ToggleSwitchSettings ¶ added in v0.1.8
type ToggleSwitchSettings struct {
Label string
TwoWayStatePath string
// OptionalFields
CustomValue string
FocusRingColor string
InputId string
InputName string
IsDisabled bool
IsRequired bool
LabelPosition string
Size string
TextColor string
ThumbBackgroundColor string
ThumbBorderColor string
TrackBackgroundColor string
TrackCheckedBackgroundColor string
}