Docs Menu

Dropdown

Dropdowns have the following properties which are optional:

Property Required? Type Options Description
id no string id value of the Dropdown (select) component.
label no string Text label for the Select.
name no string Input name of the Select (for fetching POST info).

Basic Examples
Basic Dropdown example.

            
1<x-fcui-drop-down label="Choose Your Item" name="form-name">
2 <x-slot:options>
3 <option value="pizza">Pizza</option>
4 <option value="burger">Burger</option>
5 <option value="hot-dog">Hot Dog</option>
6 </x-slot:options>
7</x-fcui-drop-down>

Advanced Example
Dropdown with an option selected by default.

            
1<x-fcui-drop-down name="form-name">
2 <x-slot:options>
3 <option value="pizza">Pizza</option>
4 <option value="burger" selected>Burger</option>
5 <option value="hot-dog">Hot Dog</option>
6 </x-slot:options>
7</x-fcui-drop-down>