> For the complete documentation index, see [llms.txt](https://docs.atomui.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.atomui.com/form-elements/select2.md).

# Select2

We have included select2 plugin for enhanced select options. select2 is free and open source plugin you can check it here <https://select2.org>

### Setup

#### Step 1

Add the plugin css before the atlas stylesheet as we have tuned it according to the scheme of our admin panel

```markup
<link rel="stylesheet" href="assets/vendor/select2/css/select2.min.css">
```

#### Step 2

Include plugin Javascript file before \</body>

```markup
<script src="assets/vendor/select2/js/select2.full.min.js" type="text/javascript"></script>
```

#### Step 3

Add `.js-select` class as selector&#x20;

```markup
<select  class="form-control js-select2">
    <option selected>Apple Pie</option>
    <option>Cup Cake</option>
    <option>Donut</option>
    <option>Eclair</option>
    <option>Froyo</option>
    <option>GingerBread</option>
    <option>HoneyComb</option>
    <option>Ice Cream Sandwich</option>
    <option>Jellybean</option>
    <option>Kitkat</option>
    <option>Lollipop</option>
    <option>Marshmallow</option>
    <option>Nougat</option>
    <option>Oreo</option>
</select>
```

#### Step 4

Initialize the plugin

```javascript
$(".js-select2").select2();
```

### Select2 Tag Input

you also have multiple inputs by using multiple attribute with select tag

```markup
<select multiple class="form-control js-select2">
    <option selected>Apple Pie</option>
    <option>Cup Cake</option>
    <option>Donut</option>
    <option>Eclair</option>
    <option>Froyo</option>
    <option>GingerBread</option>
    <option>HoneyComb</option>
    <option>Ice Cream Sandwich</option>
    <option>Jellybean</option>
    <option>Kitkat</option>
    <option>Lollipop</option>
    <option>Marshmallow</option>
    <option>Nougat</option>
    <option>Oreo</option>
</select>
```

### For more options refer&#x20;

{% embed url="<https://select2.org>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.atomui.com/form-elements/select2.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
