🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

@ng-select/ng-select

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ng-select/ng-select

Angular ng-select - All in One UI Select, Multiselect and Autocomplete

15.1.3
latest
Version published
Weekly downloads
418K
-6.44%
Maintainers
2
Weekly downloads
 
Created

What is @ng-select/ng-select?

@ng-select/ng-select is a highly customizable Angular component for creating select dropdowns. It provides a wide range of features including single and multiple selection, custom templates, filtering, and more.

What are @ng-select/ng-select's main functionalities?

Single Selection

This feature allows users to select a single item from a dropdown list. The `items` input takes an array of objects, and `bindLabel` specifies the property to display in the dropdown.

<ng-select [items]="cities" bindLabel="name" placeholder="Select a city"></ng-select>

Multiple Selection

This feature enables users to select multiple items from the dropdown. Setting the `multiple` input to `true` allows for multiple selections.

<ng-select [items]="cities" bindLabel="name" [multiple]="true" placeholder="Select cities"></ng-select>

Custom Templates

Custom templates allow for more control over the appearance of the dropdown items. The `ng-option-tmp` directive can be used to define a custom template for each item.

<ng-select [items]="cities" bindLabel="name" placeholder="Select a city">
  <ng-template ng-option-tmp let-item="item" let-index="index">
    <div class="custom-option">
      <span>{{item.name}}</span>
    </div>
  </ng-template>
</ng-select>

Filtering

The filtering feature allows users to search through the dropdown items. Setting the `searchable` input to `true` enables this functionality.

<ng-select [items]="cities" bindLabel="name" [searchable]="true" placeholder="Select a city"></ng-select>

Async Data

This feature supports loading data asynchronously. The `items` input can take an observable, and the dropdown will update as the data is loaded.

<ng-select [items]="cities$ | async" bindLabel="name" placeholder="Select a city"></ng-select>

Other packages similar to @ng-select/ng-select

FAQs

Package last updated on 27 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts