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

ngx-multi-field-dropdown

v1.0.1

Published

A customizable Angular searchable dropdown with multi-field search support.

Readme

ngx-multi-field-dropdown

A customizable, lightweight Angular searchable dropdown component that allows searching across multiple object fields with word-based filtering.

Features

  • 🔍 Multi-field Search: Search across multiple object keys (e.g., name, ID, category).
  • 🧩 Word-based Filtering: Splits search terms into words and ensures every word is present in at least one of the specified fields.
  • Signal-based: Built using modern Angular Signals for optimal performance.
  • 🎨 Premium Design: Modern, clean UI with smooth transitions and customizable via CSS variables.
  • ⌨️ Keyboard Support: Focuses search on open and supports standard interactions.
  • ⏱️ Debounced Input: Built-in debouncing for search queries.

Installation

npm install ngx-multi-field-dropdown

Usage

1. Import the Component

import { MultiFieldDropdownComponent } from 'ngx-multi-field-dropdown';

@Component({
  standalone: true,
  imports: [MultiFieldDropdownComponent],
  // ...
})
export class MyComponent {
  users = [
    { id: 1, name: 'John', lastName: 'Doe', role: 'Admin' },
    { id: 2, name: 'Jane', lastName: 'Smith', role: 'User' },
    // ...
  ];

  onSelectionChange(selected: any) {
    console.log('Selected user:', selected);
  }
}

2. Add to Template

<ngx-multi-field-dropdown
  [items]="users"
  [displayKeys]="['name', 'lastName', 'role']"
  [placeholder]="'Search users by name or role...'"
  (selectionChange)="onSelectionChange($event)"
></ngx-multi-field-dropdown>

Configuration

| Input | Type | Default | Description | |-------|------|---------|-------------| | items | any[] | [] | The array of objects to display. | | displayKeys | string[] | ['name'] | The keys to search and display. | | placeholder | string | 'Search...' | Input placeholder text. | | notFoundText | string | 'No results found' | Text shown when no results match. | | debounceTime | number | 300 | Debounce delay in milliseconds for the search input. |

Custom Styling

The component uses a standard BEM-like class structure prefixed with ngx-mfd- for easy targeting.

CSS Classes

  • .ngx-mfd: Main container
  • .ngx-mfd-trigger: The clickable input area
  • .ngx-mfd-panel: The dropdown panel containing the search and list
  • .ngx-mfd-search: The search box container
  • .ngx-mfd-option: Individual list items
  • .ngx-mfd-option--selected: Modifier for selected items

CSS Variables

You can override the following CSS variables globally (e.g., in your :root or a parent container) to match your brand:

:root {
  --mfd-primary: #3b82f6;      /* Primary accent color */
  --mfd-bg: #ffffff;           /* Background color */
  --mfd-border: #e2e8f0;       /* Border color */
  --mfd-text: #1e293b;         /* Default text color */
  --mfd-text-muted: #64748b;   /* Muted/placeholder text color */
  --mfd-hover: #f8fafc;        /* Hover background color */
  --mfd-selected-bg: #eff6ff;  /* Selected item background */
  --mfd-radius: 0.5rem;        /* Border radius for all elements */
}

Acknowledgements

Extracted from the centro-parasol project. Special thanks to the original implementation for the powerful multi-field search logic.

License

MIT