Blade component for form select element!
The form select element with basic style! You can also use default HTML attributes like name, id for the select element in this component!
Options must be a string and seperated by comma ( , ).
Ex: "name,email,city,country"
Name and value must be seperated by ( | ).
Ex: "name|value,email|value,city|value,country|value"
You can pass options as array!.
Ex: ['name','email','city','country']
Associative array does not support!
<x-select options="name|value,email|email,option|one,onlyname" />
output:
<select>
<option value="value" >name</option>
<option value="email" >email</option>
<option value="one" >option</option>
<option value="onlyname" >onlyname</option>
</select>
Result
Form select element with label and help text!
<x-select
label="Select one!"
help="This is help text!"
options="name|value,email|email,option|one,onlyname"
/>
Result
This is help text!
Made with by Deva
Build with Laravel, TailwindCSS, Livewire and AlpineJS