TailwindLiveComponents.Listbox (tailwind_live_components v0.1.11) View Source
Link to this section Summary
Functions
Renders the listbox element
Link to this section Functions
Renders the listbox element
<.listbox form={:basket} field={:fruit} prompt="Select Fruit" options={[
%{value: "apple", display: "Apple", detail: "yummy apple"},
%{value: "banana", display: "Banana", detail: "yummy banana"},
%{value: "cherry", display: "Cherry", detail: "yummy cherry"}
]} />
Options
form
- The form identifierfield
- The field namelabel
- The text for the generated<label>
elementvalue
- The current value for the inputdetail
- Optional detail shown below the inputprompt
- An option to include at the top of the options with the given prompt textoptions
- The options in the list boxerror
- Optional error messagetheme
- Optional theme to use for Tailwind classes