Skip to Content

Select

2.0.0

Requires Celeste 3.0.0

Optional
🏴󠁧󠁢󠁥󠁮󠁧󠁿

Install or Update

wp celeste pull component Select

Dependencies will automatically be installed.

Properties

Prop Description
name Input name
id Unique ID, if not set, name will be used as the ID.
label Input label
showLabel Whether or not to show the label, defaults to true. If set to false, the label will still be present, but hidden from sighted users.
icon Icon

Note

Attributes passed to this component will be rendered on the <select> and not on the root element. This lets you listen for input events as usual.

How to use it

<div x-data="{ selected: '🏴󠁧󠁢󠁥󠁮󠁧󠁿' }">
    <Select name="language" label="Language" x-model="selected">
        <option value="🏴󠁧󠁢󠁥󠁮󠁧󠁿">English</option>
        <option value="🇪🇸">Spanish</option>
        <option value="🇫🇷">French</option>
    </Select>
    <span class="text-xl text-gray-400" x-text="selected">🏴󠁧󠁢󠁥󠁮󠁧󠁿</span>
</div>