npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

avalynx-select

v1.2.1

Published

AvalynxSelect is a lightweight, customizable select dropdown component for web applications. It is designed to be used with Bootstrap version 5.3 or higher and does not require any framework dependencies.

Readme

AvalynxSelect

npm version npm downloads jsDelivr License Tests codecov GitHub stars

AvalynxSelect is a lightweight, customizable select dropdown component for web applications. It is designed to be used with Bootstrap version 5.3 or higher and does not require any framework dependencies.

Features

  • Customizable Dropdowns: Supports various customization options like live search, case sensitivity, scrollable list, and more.
  • AJAX Support: Dynamically load list items via AJAX with support for custom mapping, debouncing, and prefetching.
  • Bootstrap Integration: Designed for seamless integration with Bootstrap >= 5.3.
  • Easy to Use: Simple API for creating and managing select dropdowns within your web applications.

Example

Here's a simple example of how to use AvalynxSelect in your project:

Installation

To use AvalynxSelect in your project, you can directly include it in your HTML file. Ensure you have Bootstrap 5.3 or higher included in your project for AvalynxSelect to work correctly.

First, include Bootstrap:

<!-- Bootstrap -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>

Then, include AvalynxSelect:

<script src="path/to/avalynx-select.js"></script>

Replace path/to/avalynx-select.js with the actual path to the file in your project.

Installation via jsDelivr (Link)

AvalynxSelect is also available via jsDelivr. You can include it in your project like this:

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/avalynx-select.js"></script>

Make sure to also include Bootstrap's JS/CSS in your project to ensure AvalynxSelect displays correctly.

Installation via NPM (Link)

AvalynxSelect is also available as a npm package. You can add it to your project with the following command:

npm install avalynx-select

After installing, you can import AvalynxSelect into your JavaScript file like this:

import { AvalynxSelect } from 'avalynx-select';

Make sure to also include Bootstrap's JS/CSS in your project to ensure AvalynxSelect displays correctly.

Installation via Symfony AssetMapper

php bin/console importmap:require avalynx-select

After installing, you can import AvalynxSelect into your JavaScript file like this:

import { AvalynxSelect } from 'avalynx-select';

Make sure to also include Bootstrap's JS/CSS in your project to ensure AvalynxSelect displays correctly.

Installation via Symfony AssetComposer

More information about the Symfony AssetComposer Bundle can be found here.

{% do addAssetComposer('avalynx/avalynx-select/dist/js/avalynx-select.js') %}

Make sure to also include Bootstrap's JS/CSS in your project to ensure AvalynxSelect displays correctly.

Installation via Composer (Link)

AvalynxSelect is also available as a Composer package. You can add it to your project with the following command:

composer require avalynx/avalynx-select

After installing, you can import AvalynxSelect into your HTML file like this:

<script src="vendor/avalynx/avalynx-select/dist/js/avalynx-select.js"></script>

Make sure to also include Bootstrap's JS/CSS in your project to ensure AvalynxSelect displays correctly.

Usage

To create a select dropdown, simply instantiate a new AvalynxSelect object with the desired options:

new AvalynxSelect("#mySelect", {
  liveSearch: true,
  caseSensitive: false,
  showAll: true,
  scrollList: true,
  scrollItems: 8
}, {
  searchPlaceholder: 'Search...',
  selectPlaceholder: 'Please select...'
});

For AJAX support:

new AvalynxSelect("#myAjaxSelect", {
  ajax: {
    url: 'https://api.example.com/data',
    method: 'GET',
    minimumInputLength: 3
  }
});

Options

AvalynxSelect allows the following options for customization:

  • selector: (string) The selector to use for targeting select elements within the DOM (default: '.avalynx-select').
  • options: An object containing the following keys:
    • className: (string) A custom class name for the loader element (default: '').
    • liveSearch: (boolean) Enable live search functionality (default: false).
    • caseSensitive: (boolean) Enable case-sensitive search (default: false).
    • showAll: (boolean) Show all options when search term is empty (default: true).
    • showActive: (boolean) Show the active option in the dropdown (default: true).
    • scrollList: (boolean) Enable scrollable list (default: true).
    • scrollItems: (number) Number of items to display before scrolling (default: 8).
    • maxItemsToShow: (number|null) Cap the number of rendered items (default: null).
    • noDefaultSelection: (boolean) Do not select any option by default (default: false).
    • disabled: (boolean) Initialize the select as disabled (default: false).
    • defaultValue: (string|null) The default value to select on initialization (default: null).
    • ajax: (object|null) Configuration for AJAX data source (default: null).
      • url: (string) URL for the AJAX request (default: '').
      • method: (string) HTTP method for the AJAX request (default: 'GET').
      • headers: (object) Custom headers for the AJAX request (default: {}).
      • debounce: (number) Debounce time in milliseconds (default: 250).
      • minimumInputLength: (number) Minimum number of characters before AJAX request (default: 0).
      • length: (number) Number of items to fetch (default: 25).
      • start: (number) Starting index for fetching items (default: 0).
      • initialLoad: (boolean) Load initial data via AJAX (default: false).
      • mapRequest: (function|null) Function to map request parameters (default: null).
      • mapResponse: (function|null) Function to map response data (default: null).
      • resolveByValue: (function|null) Function to resolve a value to a label (default: null).
    • onChange: (function) Callback function to be executed when an option is selected (default: null).
    • onLoaded: (function) Callback function to be executed when the component is loaded (default: null).
  • language: An object containing the following keys:
    • searchPlaceholder: (string) Placeholder text for the search input (default: 'Search...').
    • selectPlaceholder: (string) Placeholder text for the select dropdown (default: 'Please select...').
    • loading: (string) Text to display when loading data (default: 'Loading...').
    • noResults: (string) Text to display when no results are found (default: 'No results').
    • error: (string) Text to display when an error occurs (default: 'Error loading data').
    • typeMore: (string) Text to display for minimum input requirement (default: 'Type {remaining} more characters...').
    • idleHint: (string) Hint text when the search input is empty (default: 'Start typing to search').

Contributing

Contributions are welcome! If you'd like to contribute, please fork the repository and submit a pull request with your changes or improvements. We're looking for contributions in the following areas:

  • Bug fixes
  • Feature enhancements
  • Documentation improvements

Before submitting your pull request, please ensure your changes are well-documented and follow the existing coding style of the project.

License

AvalynxSelect is open-sourced software licensed under the MIT license.

Contact

If you have any questions, feature requests, or issues, please open an issue on our GitHub repository or submit a pull request.

Thank you for considering AvalynxSelect for your project!