Debounced search

From andresdiegolanda/design-first-ai · View interactive version

Debounced search is an AI agent skill from the GitHub repository andresdiegolanda/design-first-ai. FormControl with debounceTime pattern for search inputs. Use when implementing any search or filter input.

How to use this skill

Skill file

Skill: Debounced Search (angular-user-search)

The pattern — `FormControl` + debounce

searchControl = new FormControl('');

ngOnInit(): void {
  this.searchControl.valueChanges.pipe(
    debounceTime(300),
    distinctUntilChanged(),
    takeUntil(this.destroy$)
  ).subscribe(query => this.filterItems(query ?? ''));
}

Rules

Template binding

<input type="text" [formControl]="searchControl" aria-label="..." />

Design Constraints

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.