Installation
templui add selectbox
Load the script once in your layout:
<head>
@selectbox.Script()
</head>
Examples
With Label
Multiple
Multiple Pills
No Search
Disabled
Form
Select a fruit category.
A fruit selection is required.
API Reference
Required parameter
Hover for description
SelectBox
Root container for the select box component.
| Name | Type | Default |
|---|---|---|
| | - |
| | - |
| | - |
| | |
Trigger
Button that opens the select dropdown when clicked.
| Name | Type | Default |
|---|---|---|
| | - |
| | - |
| | - |
| | - |
| | |
| | |
| | |
| | |
| | - |
Value
Display area for the selected value(s) or placeholder text.
| Name | Type | Default |
|---|---|---|
| | - |
| | - |
| | - |
| | - |
| | |
Content
Dropdown container that holds the selectable options.
| Name | Type | Default |
|---|---|---|
| | - |
| | - |
| | - |
| | |
| | - |
Group
Container for grouping related select options together.
| Name | Type | Default |
|---|---|---|
| | - |
| | - |
| | - |
Label
Label text for a group of select options.
| Name | Type | Default |
|---|---|---|
| | - |
| | - |
| | - |
Item
Individual selectable option within the dropdown.
| Name | Type | Default |
|---|---|---|
| | - |
| | - |
| | - |
| | - |
| | |
| | |