Customizable & Animated Dropdown Plugin - Nice Select

File Size: 192 KB
Views Total: 10471
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Customizable & Animated Dropdown Plugin - Nice Select

Yet another jQuery (Vanilla JavaScript) select replacement plugin that turns your native html select boxes into customizable and CSS3 animated dropdown lists with one JS call.

The plugin will convert a standard select box:

  <option value="1">Option 1</option>
  <option value="2">Option 2</option>
  <option value="3">Option 3</option>

Into an easy-to-style html list:

<div class="nice-select">
  <span class="current">Option 1</span>
  <ul class="list">
    <li class="option selected">Option 1</li>
    <li class="option">Option 2</li>
    <li class="option">Option 3</li>

See Also:

How to use it:

1. Add references to nice-select.css and nice-select.js.

<!-- Vanilla JS Version -->
<link href="css/nice-select2.css" rel="stylesheet" />
<script src="js/jquery.nice-select2.js"></script>

<!-- jQuery Version -->
<link href="css/nice-select.css" rel="stylesheet" />
<script src="/path/to/cdn/jquery.min.js"></script>
<script src="js/jquery.nice-select.js"></script>

2. Call the function niceSelect() on the select element and done.

// Vanilla JS Version

// jQuery Version

3. Make the dropdown list full width.

<select class="wide">

4. Make the dropdown list right aligned.

<select class="right">

5. Generate a compact dropdown list.

<select class="small">

6. Set the alternative text for each option.

<select id="mySelect">
  <option data-display="Custom Text">Option 1</option>

7. Enable the live search functionality (only available in nice select 2).

NiceSelect.bind(document.getElementById("mySelect"), {
  searchable: true

8. API methods.

// destroy the instance

// update the select



  • Sync focus events to original element


  • Add update and destroy methods


  • Improve support for IE <= 10


  • Tweak styles


  • Add support for disabled options

This awesome jQuery plugin is developed by hernansartorio. For more Advanced Usages, please check the demo page or visit the official website.