package base type InputProps struct { // common Name string Label string Type string // defaults to "text" Value string Class string Placeholder string Description string Error string DisabledMessage string Size string // xs sm lg xl, default: md Required bool Icon templ.Component Attrs templ.Attributes // text input MinLength string MaxLength string Pattern string ValidatorHint string // integer/decimal input Min string Max string // decimal input Step string } templ Input(props InputProps) {
if props.Label != "" { { props.Label } }
if props.Icon != nil { @props.Icon }
if props.Description != "" {
{ props.Description }
} if props.Error != "" {

{ props.Error }

} if props.ValidatorHint != "" { }
}