M Majid DS mds
GitHub

Flux components

Select

Choose from a list of options.

Province
<flux:select label="Province" placeholder="Choose...">
    <flux:select.option>Tehran</flux:select.option>
    <flux:select.option>Isfahan</flux:select.option>
    <flux:select.option>Fars</flux:select.option>
    <flux:select.option>Razavi Khorasan</flux:select.option>
</flux:select>

Groups

Category
<flux:select label="Category" placeholder="Choose...">
    <flux:select.group label="Electronics">
        <flux:select.option>Phones</flux:select.option>
        <flux:select.option>Laptops</flux:select.option>
    </flux:select.group>

    <flux:select.group label="Home">
        <flux:select.option>Appliances</flux:select.option>
        <flux:select.option>Furniture</flux:select.option>
    </flux:select.group>
</flux:select>

Sizes and state

<div class="space-y-4">
    <flux:select size="sm" placeholder="Small">
        <flux:select.option>Tehran</flux:select.option>
    </flux:select>

    <flux:select placeholder="Invalid" invalid>
        <flux:select.option>Tehran</flux:select.option>
    </flux:select>

    <flux:select placeholder="Disabled" disabled>
        <flux:select.option>Tehran</flux:select.option>
    </flux:select>
</div>

Reference

flux:select

PropDescription
labelLabel above the control.
descriptionSmaller text under the label.
placeholderShown while nothing is selected.
sizeOptions: sm, xs. Default: base.
variantOptions: default.
invalidMarks the control as invalid.
multipleAllows selecting more than one option.
wire:modelBinds to a Livewire property.

flux:select.option

PropDescription
valueSubmitted value. Defaults to the label text.

flux:select.group

PropDescription
labelGroup label inside the list.

Related