Need help in the process of creating your own WordPress theme?
Select option type.
| Name | Type | Required | Description |
|---|---|---|---|
| placeholder | string |
Specify input placeholder. | |
| choices | array |
yes |
List of items to choose from. Please checkout Choices structure. |
| Name | Type | Default | Description |
|---|---|---|---|
| size | string |
"medium" |
There are 4 sizes:
-
"short", for short input.-
"medium", for normal input.-
"large", for a large input.-
"auto", to auto width input. |
| scroll | number |
5 |
Specify from what number of items to apply scroll. |
| search | boolean |
false |
Enable or disable search feature. |
| Name | Type | Default | Description |
|---|---|---|---|
| value | string|number |
A string or number value. |
| Name | Type | Default | Description |
|---|---|---|---|
| value | string|number |
Any string or number value. | |
| title | string |
A valid value title. | |
| icon | string |
Add a custom icon for select item. | |
{
id: "names",
type: "select"
choices: [
{ value: "john", title: "John" },
{ value: "andy", title: "Andy" },
{ value: "tom", title: "Tom" }
],
}
{
id: "name",
type: "select",
config: {
size: "medium",
scroll: 5,
placeholder: "Select name",
search: true,
},
choices: [
{ value: "john", title: "John", icon: "nc-user" },
{ value: "andy", title: "Andy", icon: "nc-user" },
{ value: "tom", title: "Tom", icon: "nc-user" }
],
defaultValue: {
value: "john",
}
},