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

@libs-ui/components-inputs-search

v0.2.356-25

Published

`@libs-ui/components-inputs-search` là một thành phần nhập liệu chuyên dụng cho tính năng tìm kiếm. Nó được xây dựng dựa trên `LibsUiComponentsInputsInputComponent` và bổ sung các tính năng như tự động kích hoạt tìm kiếm sau một khoảng thời gian chờ (debo

Downloads

2,499

Readme

Search Input Component

@libs-ui/components-inputs-search là một thành phần nhập liệu chuyên dụng cho tính năng tìm kiếm. Nó được xây dựng dựa trên LibsUiComponentsInputsInputComponent và bổ sung các tính năng như tự động kích hoạt tìm kiếm sau một khoảng thời gian chờ (debounce), nút xóa nội dung tìm kiếm nhanh, và hỗ trợ các biểu tượng tùy chỉnh.

Tính năng nổi bật

  • 🔍 Auto-complete Search: Tự động phát ra sự kiện tìm kiếm sau khi người dùng ngừng nhập (mặc định 1 giây).
  • Debounce & Throttle: Tích hợp sẵn cơ chế debounce cho việc nhập liệu và throttle cho phím Enter.
  • 🧹 Clearable Support: Hỗ trợ nút xóa (hasClearSearch) xuất hiện khi có nội dung trong ô tìm kiếm.
  • 🎨 Flexible Styling: Dễ dàng tùy chỉnh border, background, chiều cao và các class CSS bổ sung.
  • ⌨️ Keyboard Support: Hỗ trợ phím Enter để kích hoạt tìm kiếm ngay lập tức.
  • 🛡️ Signal Based: Hoạt động mượt mà với Angular Signals.

Cài đặt

Sử dụng npm hoặc yarn để cài đặt:

npm install @libs-ui/components-inputs-search

Cách sử dụng

Import Module

import { LibsUiComponentsInputsSearchComponent } from '@libs-ui/components-inputs-search';

@Component({
  standalone: true,
  imports: [LibsUiComponentsInputsSearchComponent],
  // ...
})
export class YourComponent {}

Ví dụ cơ bản

<libs_ui-components-inputs-search
  (outSearch)="onSearch($event)"
  [searchConfig]="{
    placeholder: 'Tìm kiếm khách hàng...',
    hasClearSearch: true
  }"></libs_ui-components-inputs-search>

Tùy chỉnh Debounce và Icon

<libs_ui-components-inputs-search
  [debounceTime]="500"
  [searchConfig]="{
    iconLeftClass: 'libs-ui-icon-filter',
    placeholder: 'Lọc nhanh...'
  }"
  (outSearch)="handleFastFilter($event)"></libs_ui-components-inputs-search>

API Reference

Inputs

| Thuộc tính | Kiểu dữ liệu | Mặc định | Mô tả | | :--------------------------- | :------------------- | :------- | :-------------------------------------------------------- | | searchConfig | IInputSearchConfig | {} | Cấu hình cho ô tìm kiếm (placeholder, value, icons, ...). | | blurTimeOut | number | 600 | Thời gian chờ trước khi emit sự kiện blur. | | debounceTime | number | 1000 | Thời gian chờ (ms) trước khi phát ra outSearch. | | disable | boolean | false | Vô hiệu hóa ô tìm kiếm. | | focusTimeOut | number | 600 | Thời gian chờ trước khi emit sự kiện focus. | | ignoreAutoComplete | boolean | false | Nếu true, sẽ không tự động emit outSearch. | | ignoreStopPropagationEvent | boolean | false | Ngăn chặn sự kiện lan truyền ra ngoài. | | readonly | boolean | false | Chế độ chỉ đọc. |

Outputs

| Sự kiện | Kiểu dữ liệu | Mô tả | | :-------------------- | :--------------------------- | :--------------------------------------------------------------------------- | | outFocusAndBlur | IFocusAndBlurEvent | Sự kiện focus và blur. | | outFunctionsControl | IInputFunctionControlEvent | Cung cấp các phương thức điều khiển (focus, blur, ...). | | outIconLeft | string | Sự kiện khi click vào icon bên trái. | | outIconRight | string | Sự kiện khi click vào icon bên phải. | | outSearch | string | Phát ra nội dung tìm kiếm sau khoảng thời gian debounce hoặc khi nhấn Enter. | | outValueChange | string | Phát ra nội dung mới ngay lập tức mỗi khi gõ phím. |

Types & Interfaces

IInputSearchConfig

Giao diện cấu hình toàn diện cho component Search.

export interface IInputSearchConfig {
  classInclude?: string;
  classContainerInput?: string;
  placeholder?: string;
  value?: string;
  noBorder?: boolean;
  backgroundNone?: boolean;
  iconLeftClass?: string;
  iconRightClass?: string;
  defaultHeight?: number;
  classCoverInputSearch?: string;
  hasClearSearch?: boolean;
  popoverContentIconRight?: string;
}

IInputFunctionControlEvent

Được kế thừa từ component Input cơ bản để điều khiển hành vi.

export interface IInputFunctionControlEvent {
  focus: (emitEvent?: boolean) => Promise<void>;
  blur: (emitEvent?: boolean) => Promise<void>;
  resetValue: () => Promise<void>;
  insertContent: (data: string | number) => Promise<void>;
  // ... and other methods from @libs-ui/components-inputs-input
}

export interface IFocusAndBlurEvent {
  focus: boolean;
  event: FocusEvent;
}

Tech Stack

  • Core: Angular 18+, RxJS (Subject, debounceTime, throttleTime)
  • Base: @libs-ui/components-inputs-input

License

MIT