combobox

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

templ: version: v0.2.793

templ: version: v0.2.793

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComboBox

func ComboBox(props *Props) templ.Component

func Showcase

func Showcase() templ.Component

Types

type Item

type Item struct {
	Key      string `json:"label"`
	Value    string `json:"value"`
	Disabled bool   `json:"disabled"`
}

type Props

type Props struct {
	ID                string  // form ID
	Name              string  // form name
	Value             *Item   // in single mode, the value of the pre-selected item
	Selected          []*Item // in Mulitple Mode, the pre-selected item(s)
	SelectedPlacement string  // where the selected chips appears in relation to the trigger
	Multiple          bool    // support multiple selections
	By                string  // compare the objects by a particular property instead of by their identity
	Items             []*Item // slice of Items, the options to be displayed
}

Jump to

Keyboard shortcuts

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