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

@learnforjob/react-multi-select-dropdown

v1.0.6

Published

A customizable, searchable, lightweight React multi-select dropdown with async loading, checkbox support, keyboard navigation, virtualization, and TypeScript support.

Readme

React Multi Select Dropdown

A customizable, searchable, lightweight React multi-select dropdown with async loading, checkbox support, keyboard navigation, and virtualization.

NPM Package: @learnforjob/react-multi-select-dropdown

Installation

npm install @learnforjob/react-multi-select-dropdown

Usage

import React, { useState } from 'react';
import { MultiSelectDropdown } from '@learnforjob/react-multi-select-dropdown';

const options = [
  { label: 'React', value: 'react' },
  { label: 'Vue', value: 'vue' },
  { label: 'Angular', value: 'angular' },
];

function App() {
  const [selected, setSelected] = useState([]);

  return (
    <MultiSelectDropdown
      options={options}
      value={selected}
      onChange={setSelected}
      placeholder="Select frameworks"
    />
  );
}

export default App;

Live Demo

Try it out in the npm-dropdown-example app:

cd npm-dropdown-example
npm install
npm start

Open http://localhost:3000 to see all features in action.

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | options | Option[] | [] | Array of {label, value} options to display | | value | (string \| number)[] | [] | Currently selected values | | onChange | (values: (string \| number)[]) => void | undefined | Callback when selection changes | | placeholder | string | 'Select options' | Placeholder text when nothing is selected | | disabled | boolean | false | Disable the dropdown | | selectAllText | string | 'Select All' | Text for the "Select All" checkbox | | searchable | boolean | true | Enable/disable the search input | | groupBy | string | undefined | Property name to group options by | | maxSelectionLimit | number | undefined | Maximum number of options that can be selected | | renderOption | (option: Option) => React.ReactNode | undefined | Custom renderer for each option row | | renderTag | (option: Option) => React.ReactNode | undefined | Custom renderer for selected tags in the header | | customClassName | string | undefined | Additional CSS class added to the root container | | theme | Theme | undefined | Theme object to customize colors, sizes, and borders |

Theme Properties

| Property | Type | Default | Description | |----------|------|---------|-------------| | primaryColor | string | '#339ef7' | Primary accent color | | primaryHover | string | '#1a8ceb' | Hover accent color | | bgColor | string | '#ffffff' | Background color | | borderColor | string | '#cccccc' | Border color | | textColor | string | '#333333' | Text color | | placeholderColor | string | '#495057' | Placeholder text color | | itemHoverBg | string | '#ebf5ff' | Option hover background | | selectedBg | string | '#339ef7' | Selected item background | | selectedColor | string | '#ffffff' | Selected item text color | | disabledBg | string | '#e9ecef' | Disabled background | | disabledColor | string | '#b3b3b3' | Disabled text color | | borderRadius | string | '4px' | Border radius | | fontSize | string | '1rem' | Font size | | headerHeight | string | '36px' | Header height |

TypeScript Support

This package is written in TypeScript and includes type definitions — no extra @types package needed.

import { MultiSelectDropdown, Theme } from '@learnforjob/react-multi-select-dropdown';

const myTheme: Theme = {
  primaryColor: '#ff6b6b',
  itemHoverBg: '#ffe0e0',
  borderRadius: '8px',
  headerHeight: '42px',
};

<MultiSelectDropdown theme={myTheme} ... />

Customization

Customize rendering of options and selected tags:

<MultiSelectDropdown
  options={options}
  value={selected}
  onChange={setSelected}
  renderOption={(option) => (
    <div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
      <span>{option.label}</span>
      <small style={{ color: '#888' }}>{option.value}</small>
    </div>
  )}
  renderTag={(option) => (
    <span style={{ backgroundColor: 'lightblue', borderRadius: '12px', padding: '2px 8px' }}>
      {option.label}
    </span>
  )}
/>

Grouped Options

Use the groupBy prop to visually group options by a shared property:

const groupedOptions = [
  { label: 'React', value: 'react', category: 'Framework' },
  { label: 'Vue', value: 'vue', category: 'Framework' },
  { label: 'HTML', value: 'html', category: 'Language' },
  { label: 'CSS', value: 'css', category: 'Language' },
];

<MultiSelectDropdown
  options={groupedOptions}
  value={selected}
  onChange={setSelected}
  groupBy="category"
/>

Accessibility

The component includes:

  • Keyboard navigation (Arrow keys, Enter, Escape)
  • Checkbox semantics with proper labeling

Security

This package has been audited. Run npm audit in your project after installation for the latest vulnerability report.

License

MIT