Documentation
¶
Overview ¶
templ: version: v0.3.1070
templ: version: v0.3.1070
templ: version: v0.3.1070
templ: version: v0.3.1070
templ: version: v0.3.1070
templ: version: v0.3.1070
templ: version: v0.3.1070
templ: version: v0.3.1070
templ: version: v0.3.1070
templ: version: v0.3.1070
templ: version: v0.3.1070
templ: version: v0.3.1070
templ: version: v0.3.1070
Index ¶
- Constants
- func CheckboxInput(componentSettings CheckboxInputSettings) templ.Component
- func FloatingButton(componentSettings FloatingButtonSettings) templ.Component
- func InlineCheckboxGroup(componentSettings InlineCheckboxGroupSettings) templ.Component
- 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 PasswordInput(componentSettings PasswordInputSettings) templ.Component
- func RadioInput(componentSettings RadioInputSettings) templ.Component
- func RemoteSearchableSelectInput(componentSettings RemoteSearchableSelectInputSettings) templ.Component
- func SearchableSelectInput(componentSettings SearchableSelectInputSettings) templ.Component
- func SelectInput(componentSettings SelectInputSettings) templ.Component
- func TextArea(componentSettings TextAreaSettings) templ.Component
- func ToggleSwitch(componentSettings ToggleSwitchSettings) templ.Component
- type CheckboxInputSettings
- type FloatingButtonSettings
- type FloatingButtonStyle
- type InlineCheckboxGroupSettings
- type InlineRadioGroupSettings
- type InputFieldSettings
- type InputHintSettings
- type PasswordInputRules
- type PasswordInputSettings
- type RadioInputSettings
- type RemoteSearchableSelectInputSettings
- type SearchableSelectInputSettings
- type SelectInputSettings
- type SelectLabelValueOption
- type TextAreaSettings
- type ToggleSwitchSettings
Constants ¶
const ( CheckboxInputSizeXs string = "xs" CheckboxInputSizeSm string = "sm" CheckboxInputSizeMd string = "md" CheckboxInputSizeLg string = "lg" CheckboxInputSizeXl string = "xl" CheckboxInputLabelPositionLeft string = "left" CheckboxInputLabelPositionRight string = "right" )
const ( InlineCheckboxGroupOrientationHorizontal string = inlineGroupOrientationHorizontal InlineCheckboxGroupOrientationVertical string = inlineGroupOrientationVertical )
const ( InlineRadioGroupOrientationHorizontal string = inlineGroupOrientationHorizontal InlineRadioGroupOrientationVertical string = inlineGroupOrientationVertical )
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" InputFieldSizeXs string = "xs" InputFieldSizeSm string = "sm" InputFieldSizeMd string = "md" InputFieldSizeLg string = "lg" InputFieldSizeXl string = "xl" )
const ( InputHintDisplayTooltip string = "tooltip" InputHintDisplayDescription string = "description" InputHintSizeSm string = "sm" InputHintSizeLg string = "lg" InputHintIconStylePlain string = "plain" InputHintIconStyleBoxed string = "boxed" )
const ( PasswordInputActionButtonStyleBoxed string = "boxed" PasswordInputActionButtonStylePlain string = "plain" )
const ( RadioInputSizeXs string = "xs" RadioInputSizeSm string = "sm" RadioInputSizeMd string = "md" RadioInputSizeLg string = "lg" RadioInputSizeXl string = "xl" )
const ( SearchableSelectInputSelectionDisplayText string = "text" SearchableSelectInputSelectionDisplayTags string = "tags" )
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 CheckboxInput ¶ added in v0.2.1
func CheckboxInput(componentSettings CheckboxInputSettings) templ.Component
func FloatingButton ¶ added in v0.2.7
func FloatingButton(componentSettings FloatingButtonSettings) templ.Component
func InlineCheckboxGroup ¶ added in v0.2.6
func InlineCheckboxGroup(componentSettings InlineCheckboxGroupSettings) templ.Component
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 PasswordInput ¶ added in v0.2.6
func PasswordInput(componentSettings PasswordInputSettings) templ.Component
func RadioInput ¶
func RadioInput(componentSettings RadioInputSettings) templ.Component
func RemoteSearchableSelectInput ¶ added in v0.2.6
func RemoteSearchableSelectInput(componentSettings RemoteSearchableSelectInputSettings) templ.Component
func SearchableSelectInput ¶ added in v0.2.6
func SearchableSelectInput(componentSettings SearchableSelectInputSettings) 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 CheckboxInputSettings ¶ added in v0.2.1
type CheckboxInputSettings struct {
// OptionalFields
AriaLabel string
CheckedColor string
ErrorColor string
ErrorMessage string
ErrorMessageOneWayStatePath string
FocusRingColor string
IndeterminateOneWayStatePath string
InputId string
InputName string
IsChecked bool
IsCheckedOneWayStatePath string
IsDisabled bool
IsDisabledOneWayStatePath string
IsFullWidth bool
IsInvalid bool
IsInvalidOneWayStatePath string
IsRequired bool
Label string
LabelPosition string
OnChangeFunc string
Shape string
Size string
TextCase string
TextColor string
TwoWayStatePath string
UncheckedColor string
Value string
}
type FloatingButtonSettings ¶ added in v0.2.7
type FloatingButtonSettings struct {
AriaLabel string
OnClickFunc string
// OptionalFields
Icon string
IconOneWayStatePath string
Style FloatingButtonStyle
}
type FloatingButtonStyle ¶ added in v0.2.7
type InlineCheckboxGroupSettings ¶ added in v0.2.6
type InlineCheckboxGroupSettings struct {
Label string
InputSettings []CheckboxInputSettings
// OptionalFields
Orientation string
MaxVisibleOptions uint
TextCase string
FloatingButtonStyle FloatingButtonStyle
ShouldHideFloatingButtons bool
}
type InputFieldSettings ¶
type InputFieldSettings struct {
InputType string
InputName string
Label string
// OptionalFields
TwoWayStatePath string
Value string
AffixLeftValue string
AffixLeftStatePath string
AffixLeftWidthPercent uint
AffixRightValue string
AffixRightStatePath string
AffixRightWidthPercent uint
AffixRightComponent templ.Component
IconLeft string
InputId string
InputTypeExpression string
InputNumberMin string
InputNumberMax string
InputNumberStep string
IsRequired bool
IsReadOnly bool
TextCase string
HintValue string
HintStatePath string
HintDisplay string
HintDisplayTooltipBackgroundColor string
HintDisplayTooltipMinWidthClass string
HintDisplayTooltipMaxWidthClass string
HintDisplayTooltipMinHeightClass string
HintDisplayTooltipMaxHeightClass string
HintIconStyle string
Size string
}
type InputHintSettings ¶ added in v0.2.0
type PasswordInputRules ¶ added in v0.2.6
type PasswordInputSettings ¶ added in v0.2.6
type PasswordInputSettings struct {
InputName string
Label string
TwoWayStatePath string
// OptionalFields
Rules PasswordInputRules
Value string
Size string
TextCase string
ActionButtonStyle string
IsRequired bool
IsReadOnly bool
ShouldShowGenerateButton bool
ShouldShowStrengthMeter bool
StrengthMeterColor string
StrengthCriteriaTextColor string
StrengthCriteriaFulfilledIconColor string
StrengthCriteriaUnfulfilledIconColor string
HintValue string
HintStatePath string
HintDisplay string
HintDisplayTooltipBackgroundColor string
HintDisplayTooltipMinWidthClass string
HintDisplayTooltipMaxWidthClass string
HintDisplayTooltipMinHeightClass string
HintDisplayTooltipMaxHeightClass string
HintIconStyle string
}
type RadioInputSettings ¶
type RemoteSearchableSelectInputSettings ¶ added in v0.2.6
type RemoteSearchableSelectInputSettings struct {
InputName string
Label string
OptionsUrl string
// OptionalFields
OptionsQueryParam string
MinQueryLength uint
DebounceMs uint
TwoWayStatePath string
InputId string
IsMultiSelect bool
InitialOptions []SelectLabelValueOption
OnChangeFunc string
Size string
TextCase string
DropdownBackgroundColor string
DropdownMinHeightClass string
DropdownMaxHeightClass string
MaxVisibleOptions uint
IsDisabledOneWayStatePath string
HintValue string
HintStatePath string
HintDisplay string
HintDisplayTooltipBackgroundColor string
HintDisplayTooltipMinWidthClass string
HintDisplayTooltipMaxWidthClass string
HintDisplayTooltipMinHeightClass string
HintDisplayTooltipMaxHeightClass string
HintIconStyle string
}
type SearchableSelectInputSettings ¶ added in v0.2.6
type SearchableSelectInputSettings struct {
InputName string
Label string
// OptionalFields
FlatOptions []string
LabelValueOptions []SelectLabelValueOption
TwoWayStatePath string
InputId string
IsMultiSelect bool
SelectionDisplay string
ShouldAllowCustomValues bool
TagOuterBackgroundColor string
TagOuterTextColor string
TagInnerBackgroundColor string
OnChangeFunc string
Size string
TextCase string
DropdownBackgroundColor string
DropdownMinHeightClass string
DropdownMaxHeightClass string
MaxVisibleOptions uint
IsDisabledOneWayStatePath string
HintValue string
HintStatePath string
HintDisplay string
HintDisplayTooltipBackgroundColor string
HintDisplayTooltipMinWidthClass string
HintDisplayTooltipMaxWidthClass string
HintDisplayTooltipMinHeightClass string
HintDisplayTooltipMaxHeightClass string
HintIconStyle string
}
type SelectInputSettings ¶
type SelectInputSettings struct {
InputName string
Label string
// OptionalFields
FlatOptions []string
LabelValueOptions []SelectLabelValueOption
TwoWayStatePath string
InputId string
IsMultiSelect bool
OnChangeFunc string
Size string
TextCase string
DropdownBackgroundColor string
DropdownMinHeightClass string
DropdownMaxHeightClass string
MaxVisibleOptions uint
IsDisabledOneWayStatePath string
IsRequired bool
ShouldIncludeBlankOption bool
HintValue string
HintStatePath string
HintDisplay string
HintDisplayTooltipBackgroundColor string
HintDisplayTooltipMinWidthClass string
HintDisplayTooltipMaxWidthClass string
HintDisplayTooltipMinHeightClass string
HintDisplayTooltipMaxHeightClass string
HintIconStyle string
}
type SelectLabelValueOption ¶
type TextAreaSettings ¶
type TextAreaSettings struct {
Label string
// OptionalFields
InputId string
InputName string
Size string
TextCase string
TwoWayStatePath string
Value string
IsCode bool
IsReadOnly bool
IsRequired bool
FloatingButtonStyle FloatingButtonStyle
ShouldHideFloatingButtons bool
HintValue string
HintStatePath string
HintDisplay string
HintDisplayTooltipBackgroundColor string
HintDisplayTooltipMinWidthClass string
HintDisplayTooltipMaxWidthClass string
HintDisplayTooltipMinHeightClass string
HintDisplayTooltipMaxHeightClass string
}
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
TextCase string
TextColor string
ThumbBackgroundColor string
ThumbBorderColor string
TrackBackgroundColor string
TrackCheckedBackgroundColor string
}
Source Files
¶
- checkboxInput_templ.go
- floatingButton_templ.go
- inlineCheckboxGroup_templ.go
- inlineGroup.go
- inlineRadioGroup_templ.go
- inputField_templ.go
- inputHint_templ.go
- passwordInput_templ.go
- radioInput_templ.go
- remoteSearchableSelectInput_templ.go
- searchableSelectInput.go
- searchableSelectInput_templ.go
- selectDropdown.go
- selectInput_templ.go
- textArea_templ.go
- toggleSwitch_templ.go