latest version

Multi Select

Multi select option type.

Fields

Name Type Required Description
placeholder string   Specify input placeholder.
choices array yes List of items to choose from. Please checkout Choices structure.

Config

Name Type Default Description
size string "medium"
Specify the input size.

There are 4 sizes:
- "short", for short input.
- "medium", for normal input.
- "large", for a large input.
- "auto", to full width input.
placeholder string "" Specify input placeholder.
items number   Specify maximum numbers of items that can be selected
scroll number 5 Specify from what number of items to apply scroll.
search boolean true Enable or disable search feature.
choices array   List of items to choose from. Please checkout Choices structure.

DefaultValue

Name Type Default Description
value array   Array of string or number value.

Choices structure

Name Type Default Description
value string|number Any string or number values.
title string A valid value title.
icon string Add a custom icon for select item.

Minimal Usage

{
  id: "names",
  type: "multiSelect",
  choices: [
    { value: "john", title: "John" },
    { value: "andy", title: "Andy" },
    { value: "tom", title: "Tom" }
  ]
}

Usage

{
  id: "names",
  type: "multiSelect",
  config: {
    size: "medium",
    items: 5,
    scroll: 5,
    placeholder: "Select names",
    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", "andy"],
  }
},