Select
Single select
A single-value select field, powered by SlimSelect.
Multiple select
A multi-value select field, allowing several options to be selected at once.
Select without search
A select field with the search input inside the dropdown disabled (single-value or multi-value).
List of arguments for select
| Argument | Type | Description | Possible Values |
|---|---|---|---|
| label | string | Defines the label of the field (mandatory even if label is hidden). | — |
| label-slug | string | Defines the label that will be used for the 'name', the 'for' and the 'id' attributes linking the label and the select. | — |
| placeholder | string | Defines the placeholder text shown before a value is selected (used as data-placeholder by select.js/SlimSelect). | — |
| options | array | List of selectable option values. Pass a PHP array from get_template_part, or a comma-separated string. | — |
| multiple | boolean | Whether multiple options can be selected. | true, false |
| search | boolean | Whether the search input inside the dropdown is shown. Defaults to true. | true, false |
| disabled | boolean | Indicates whether the field is disabled. | true, false |
| theme | string | Specifies the theme of the component. | light, dark |
| size | string | Defines the size of the component. | default, small |