Debounced UI Search and Filters
Implement search/filter navigation with debounced input, safe request cancellation, truthful loading, empty and error states, and browser history checks.
Define when a search is considered committed. Keep the input draft responsive while the applied query and filters reflect either an explicit submit or a bounded pause. Model loading, ready, empty, error and canceled as distinct outcomes. Retain old results during loading only if they are labeled as previous results and do not suggest they match the new query. ## Key Points - [WHATWG Fetch cancellation model](https://fetch.spec.whatwg.org/) - [WHATWG URL encoding](https://url.spec.whatwg.org/) - [WCAG 2.2 status messages](https://www.w3.org/TR/WCAG22/?KBOpenTab=undefined)
skilldb get ux-design-patterns-skills/debounced-search-and-filtersFull skill: 29 linesDebounced UI Search and Filters
Define when a search is considered committed. Keep the input draft responsive while the applied query and filters reflect either an explicit submit or a bounded pause. Model loading, ready, empty, error and canceled as distinct outcomes. Retain old results during loading only if they are labeled as previous results and do not suggest they match the new query.
Link scheduling, requests and navigation
Debounce text input and allow Enter or a clear action to apply immediately. Avoid submitting partial text during composition from an input method editor. Reset pagination or cursors when an applied query or filter set changes. Use the URL for intentional shareable filter state, and decide which actions replace history versus add an entry. Cancel pending debounce work when the user navigates Back, changes route or clears the query.
Give each applied request a key for the exact query, filters, page and relevant scope. Cancel older fetches with AbortController where supported, and check current request identity before committing results. A request may finish after cancellation or after another read began, so cancellation alone is insufficient. A late older response must never replace the current results or clear the current loading state. Use bounded retries for actual temporary errors and keep an aborted request out of the error UI.
Make the results understandable
Keep focus in the input after automatic refresh. Expose loading and the final count or empty state through an appropriate status announcement, without announcing on every keypress. Keep clear controls and filter names accessible and allow a retry when a request fails. Avoid reporting a request failure as zero matches. Test query clearance and minimum length with explicit empty or default behavior.
Use a deterministic fixture where the first request returns after the second. Also test fast typing, paste, Enter, IME composition, Back during debounce, network failure and an actual zero result. Observe both visible results and request counts. Confirm URL, input, status and list agree at the end. Record browser, delay policy and which network behavior was simulated.
References and rights
Original SkillDB instructions under LicenseRef-SkillDB-Content. References were checked 2026-11-13 and used for technical verification.
Install this skill directly: skilldb add ux-design-patterns-skills
Related Skills
form-patterns
Form design patterns for validation, multi-step forms, inline editing, and error handling
Accessible Gallery and Carousel Navigation
Build a responsive media gallery or carousel with visible controls, keyboard and touch navigation, stable focus and reduced-motion behavior.
Audit Interface Microcopy Across Interaction States
Write accessible action, error, progress, empty, help, and confirmation text and verify it through one real interface flow.
modal-patterns
Modal and dialog UX patterns for confirmations, form modals, drawers, and command palettes
navigation-patterns
Navigation patterns including breadcrumbs, tabs, command palette, and sidebar collapse
notification-system
Toast, banner, badge, and inbox-style notification patterns