# Installation

### NPM

```bash
npm install @desislavsd/vue-select
```

Then import and install the plugin

```javascript
import '@desislavsd/vue-select/dist/vue-select.css'
import VueSelect from '@desislavsd/vue-select'

Vue.use(VueSelect, { /* options */ } ) // registers <v-select /> globally
```

Or use without installation in `.vue` files:

```javascript
import { vSelect } from '@desislavsd/vue-select'

export default {
    components: { vSelect }
}
```

## Direct `<script>` include

Include after the the vue.js script tag:

```markup
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@desislavsd/vue-select/dist/vue-select.css">
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vue"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@desislavsd/vue-select"></script>
```

Then in your JavaScript file:

```javascript
Vue.use(VueSelect, { /* options */ } ) /* registers <v-select /> globally
```

or without global installation:

```javascript
new Vue({
    el: '#app',
    components: { vSelect: VueSelect.vSelect }
})
```

## Plugin options and defaults

Installing the plugin makes the select component globally available throughout the app using `Vue.component`. Here are the available options and their defaults:

```javascript
Vue.use(VueSelect, {
    /** 
     * The name of the globally available component.
     * defaults to <v-select>
     */
    name: 'vSelect',
    
    /**
     * A Vue mixin that can be used to override
     * default options and methods of the original 
     * component. Useful to define app specific 
     * standart of the select component.
     */
    mixin: {}
})
```

The options are applied as follows:

```javascript
let { name, mixin } = options;

Vue.component(name, {
    mixins: [ vSelect, mixin ]
});
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://desislavsd.gitbook.io/vue-select/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
