> For the complete documentation index, see [llms.txt](https://desislavsd.gitbook.io/vue-select/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://desislavsd.gitbook.io/vue-select/props.md).

# Props

A list with all available props that the vSelect component accepts.

{% hint style="success" %}
These are the available props. The vSelect component does not inherit attributes and all additional attributes are directly passed to the internal input element and can be used for further altering the behavior of the component like: `disabled`, `readonly`, `pattern`, `required`, `autofocus`. **The fetching function won't be called unless the input is** `:valid`
{% endhint %}

{% hint style="warning" %}
By default the component will try to fetch the options list even if there is no query. If the query is required you may pass the `required` or the `minlength`attribute. The latter is recommended to avoid form HTML5 validation issues when the input is empty.
{% endhint %}

| Prop              |     Default    | Type                                                              | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ----------------- | :------------: | ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **value**         |                | Any                                                               | Enables `v-model` usage and determines the selected options.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **stateful**      |     `false`    | Boolean                                                           | By default the component relies on `:value` / `v-model` for displaying the selected options and doesn't persist internal state. This way the UI changes only when the passed value changes. Setting this prop to `true` will enable internal state of the value that will be automatically updated on each `input` event. *This should generally not be used in conjunction with `v-model`*                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **query**         |                | String                                                            | Sets the query string in the input. Supports `sync` modifier.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **from**          |      `[]`      | Array                                                             | Feed with options for the dropdown list                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
|                   |                | Function                                                          | Function that returns the list array. Can be `async` i.e. promises are supported.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
|                   |                | String                                                            | URL that will be used for fetching the list via AJAX. See **fetch** prop.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **as**            |   `undefined`  | String                                                            | <p>Required when working with non primitive values (objects) to specify a <code>":"</code> separated paths to <strong>label</strong>, <strong>value</strong> and <strong>index</strong> in that order for each list option<strong>. All paths are required.</strong> The <strong>index</strong> path should point to a <strong>unique primitive</strong> value for a reliable comparison and better performance. Check <a href="/vue-select/vselectoption.md">VSelectOption</a> and this <a href="https://github.com/desislavsd/vue-select/issues/9">issue</a> for more details.</p><p></p><p><em>Example:</em>  <code>as="label:value:id"</code><em>,</em> <code>as="user.name::id"</code></p><p><br><em>Notice:</em> In the last example <strong>value</strong> path was skipped (empty string) resulting in the whole object being assigned to the model.</p> |
|                   |                | Array(String)                                                     | An array of paths to **label**, **value** and **index** propertie&#x73;*.* Check [VSelectOption](/vue-select/vselectoption.md) for more details.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **fetch**         | `fetchAdapter` | Function                                                          | <p><code>async</code>function that returns the list array. <br><br>The default function looks for URL in the <strong>from</strong> prop and makes requests via <a href="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API">Fetch API</a>. If the URL contains <code>%s</code> it will be replaced with the query in the input and will make requests each time the query changes.</p><p></p><p><em>Examples:</em> <br><em><code>from="/users"</code> - static url</em><br><em><code>from="/users?q=%s"</code> - dynamic url</em></p>                                                                                                                                                                                                                                                                                                                    |
| **parse**         |                | String                                                            | Path to property of the fetch response that contains the list array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
|                   |                | Function                                                          | Function that returns the list array from the fetch response.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **filter**        |     *auto*     | Boolean                                                           | <p>Force enable / disable list filtering. By default filtering is enabled when <strong>from</strong> is considered static, i.e: </p><ol><li>is an array</li><li>is a static URL ( has no <code>%s</code>)</li><li>is a function with arity=0 ( expects no arguments )</li></ol>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
|                   |                | Function ( [VSelectOption](/vue-select/vselectoption.md), query ) | <p>Custom function to filter the list against query.<br></p><p><em><strong>Notice:</strong> If provided it will force enable filtering and will override <strong>filterBy</strong></em></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **filterBy**      |   `filterBy`   | Function                                                          | This is the default filtering function when **filter** prop is `true`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| **tagging**       |     `false`    | Boolean                                                           | Enable / disable tagging. When enabled for a list with non primitive values **label** path must be specified in the **as** prop.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
|                   |                | Function                                                          | Enable / disable tagging based on function returned value. Should return `false` or the option to be used as tag. `async` is supported. May be used to save tagged option to the server.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **tag-keys**      |      `[]`      | Array(int)                                                        | <p>Key codes that will trigger tagging. <strong>Enter</strong> key is always a tagging key and should not be listed!<br></p><p><em>Example:</em>  </p><p><code>:tag-keys="\[9, 32, 188]"</code> - use <strong>Tab, Spacebar</strong> and <strong>","</strong> as tag separators</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **tags**          |                | Array([VSelectOption](/vue-select/vselectoption.md))              | Use with `sync` modifier. A **readonly** list of [VSelectOption](/vue-select/vselectoption.md)s that corresponds to the current selected value. Useful when the value is set to a property of the option but you also need access to the whole option object.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **multiple**      |     *auto*     | Boolean                                                           | Force enable / disable multiple selection. By default it's true when `v-model` is an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **debounce**      |       250      | Number                                                            | Time in milliseconds to wait after typing before executing the fetching function for dynamic lists.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **closeOnSelect** |     *auto*     | Boolean                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **clearOnSelect** |     *auto*     | Boolean                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **clearOnClose**  |     *auto*     | Boolean                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **find**          |                | Function/false                                                    | Function that receives and array of incomplete vSelectOptions and should return an array of options that can be used to complete them. The default function simply uses the `:from` prop.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
