Giter Site home page Giter Site logo

avalynx / avalynx-select Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 85 KB

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.

License: MIT License

Shell 0.86% Dockerfile 0.62% HTML 0.41% JavaScript 98.11%
avalynx bootstrap bootstrap5 component dropdown livesearch select

avalynx-select's Introduction

AvalynxSelect

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.
  • 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 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...'
});

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).
    • scrollList: (boolean) Enable scrollable list (default: true).
    • scrollItems: (number) Number of items to display before scrolling (default: 8).
    • noDefaultSelection: (boolean) Do not select any option by default (default: false).
  • 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...').

Planned Features

  • Add support for multiple selection
  • Add support for grouped options
  • Add support for styling options

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!

avalynx-select's People

Contributors

jschwind avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.