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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@jthomae1/dselect

v1.1.1

Published

Dropdown select box for bootstrap 5.3

Readme

dselect Fork

Dropdown select box for bootstrap 5 - A customizable dropdown select box built for Bootstrap 5, enhanced with additional flexibility for the Creatable feature. This repository is a fork of the original dselect project.

Overview

This version of dselect brings you the same great features, including placeholder text, multiple selections, search functionality, and more. Plus, enjoy the ability to create new options dynamically!

Key Features

  • Placeholder Support: Easily set a placeholder for your select box.
  • Multiple Selection: Enable multiple selections at once.
  • Search Feature: Quickly find items in large lists.
  • Creatable Options: Add new options on-the-fly.
  • Clearable: Simplify selection clearing.
  • Dynamic Sizing: Adjust component size with ease.
  • Built-in Validation: Ensure data integrity.

Installation

Install dselect with npm

npm install @jthomae1/dselect

Install from cdn

<link rel="stylesheet" href="https://unpkg.com/@jthomae1/dselect/dist/css/dselect.css">
<script src="https://unpkg.com/@jthomae1/dselect/dist/js/dselect.js"></script>

Quick Start

Here's how to quickly set up dselect in your project:

HTML

<select class="form-select" id="dselect-example">
    <option value="chrome">Chrome</option>
    <option value="firefox">Firefox</option>
    <option value="safari">Safari</option>
    <option value="edge">Edge</option>
    <option value="opera">Opera</option>
    <option value="brave">Brave</option>
</select>

JavaScript

dselect(document.querySelector('#dselect-example'))

Configuration Options

Customize dselect with these options:

const config = {
    search: false, // Toggle search feature. Default: false
    creatable: false, // Creatable selection. Default: false
    clearable: false, // Clearable selection. Default: false
    maxHeight: '360px', // Max height for showing scrollbar. Default: 360px
    size: '', // Can be "sm" or "lg". Default ''
}
dselect(document.querySelector('#dselect-example'), config)

Inline Configuration

Options can also be set directly in the HTML using data-dselect-* attributes:

<select data-dselect-search="true" data-dselect-creatable="true" data-dselect-clearable="true" data-dselect-max-height="300px" data-dselect-size="sm" class="form-select" id="dselect-example">
...
</select>

Changes and Improvements

This fork introduces enhancements to the dropdown functionality, including improved search and creation capabilities. Previously, the dropdown restricted adding new entries if they started with existing item letters, causing limitations for users. The updated logic now allows for any new values to be added unless they exactly match an existing entry and have at least three letters, thereby expanding on the original functionality. The changes can be tested by downloading the repository and opening the index.html in a browser of your choice.

An example has been added to the index.html file that combines the creation and multiple selection.

Additionally, some dependencies in the package.json were updated, including bootstrap to version '5.3.3'.

Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page and submit new ideas.

License

This project is licensed under the MIT License. See the LICENSE file for more details.