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

react-customizable-dropdown

v1.0.5

Published

A highly customizable, accessible, and premium React Dropdown component with built-in search, multi-select, field mapping, debouncing, sublabels, and extensive theming options.

Readme

react-customizable-dropdown

A highly customizable, accessible, and premium React Dropdown component built with TypeScript and Tailwind-inspired styling.

Features

  • 🎨 Premium Aesthetics: Smooth animations and modern design.
  • 🔍 Searchable: Built-in search functionality for large option sets.
  • 📦 Multi-select: Support for selecting multiple values with chip display.
  • 🛠️ Field Mapping: Use custom keys for label, value, and sublabel.
  • 📝 Sublabels: Support for descriptive subtext below each option.
  • ⌨️ Keyboard Accessible: Full support for arrow keys, enter, and escape.
  • 📱 Responsive: Works seamlessly on mobile and desktop.
  • 🎨 Themable: Easy customization via theme props.

Installation

npm install react-customizable-dropdown
# or
yarn add react-customizable-dropdown
# or
pnpm add react-customizable-dropdown

Basic Usage

import { Dropdown } from "react-customizable-dropdown";
import { useState } from "react";

const options = [
  { label: "Option 1", value: "1" },
  { label: "Option 2", value: "2" },
];

function App() {
  const [value, setValue] = useState("1");

  return (
    <Dropdown
      options={options}
      value={value}
      onChange={setValue}
      label="Select an Option"
    />
  );
}

Advanced Features

1. Dynamic Field Mapping

If your data doesn't use the standard label and value keys, you can map them using props:

const users = [
  { id: 101, fullName: "John Doe", role: "Admin" },
  { id: 102, fullName: "Jane Smith", role: "User" },
];

<Dropdown
  options={users}
  valueField="id" // Use 'id' for the value logic
  labelField="fullName" // Use 'fullName' for the display label
  sublabelField="role" // Use 'role' for the descriptive text
  value={selectedUserId}
  onChange={setSelectedUserId}
/>;

2. Multi-Select & Searchable

Enable multiple selections and search filter:

<Dropdown
  options={options}
  multiSelect
  searchable
  placeholder="Search and select many..."
/>

Props API

| Prop | Type | Default | Description | | :-------------- | :----------------------------------- | :------------ | :----------------------------------------- | | options | DropdownOption[] | [] | Array of option objects. | | value | any | - | Current selected value(s). | | onChange | (value: any, option?: any) => void | - | Callback when selection changes. | | label | ReactNode | - | Label displayed above the dropdown. | | labelField | string | "label" | Field name to use as labels in options. | | valueField | string | "value" | Field name to use as values in options. | | sublabelField | string | "sublabel" | Field name to use as sublabels in options. | | searchable | boolean | false | Enable/disable search input. | | multiSelect | boolean | false | Enable/disable multiple selection. | | disabled | boolean | false | Disable the component. | | loading | boolean | false | Show a loading spinner. | | placeholder | string | "Select..." | Placeholder text. | | theme | DropdownTheme | - | UI theme customization object. |


License

MIT © [shiningsudipto]