Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OptGroup ¶
func OptGroup(p OptGroupProps) templ.Component
OptGroup renders a native optgroup around option children.
func Select ¶
func Select(p SelectProps) templ.Component
Select renders option children from Options slice.
func SelectClasses ¶
func SelectClasses(p SelectProps) string
func SelectOption ¶
func SelectOption(p OptionProps) templ.Component
SelectOption renders an option for custom Select children.
Types ¶
type OptGroupProps ¶
type OptGroupProps struct {
Class string
Label string
Disabled bool
Attrs templ.Attributes
}
OptGroupProps configures a native optgroup.
type OptionProps ¶
type OptionProps struct {
Value string
Label string
Selected bool
Disabled bool
Attrs templ.Attributes
}
OptionProps configures a slot-based option.
type SelectProps ¶
type SelectProps struct {
Variant string
Size string
Class string
Name string
// Value — currently selected option value
Value string
Disabled bool
Required bool
Options []Option
ID string
Role string
TabIndex string
AriaLabel string
Attrs templ.Attributes
}
SelectProps configures a native select element.
Click to show internal directories.
Click to hide internal directories.