Not affiliated with official shadcn/ui. Visit ui.shadcn.com for official docs.
React Combobox - Recent Selections Section
A React combobox with Recent selections section using Clock icon and CommandGroup headings separating frequently accessed items from full list with shadcn/ui
Looking to implement shadcn/ui patterns?
Join our Discord community for help from other developers.
History speeds selection—favorites at the top. This React combobox features Recent section with Clock icon from Lucide React separating commonly used items from complete list using CommandGroup headings and CommandSeparator. Built with shadcn/ui Command and Popover filtering all files to exclude already-shown recent items preventing duplicates. The recent pattern prioritizes frequent selections—perfect for file pickers, page navigation, contact selectors, command palettes, or anywhere user history should surface most relevant options first reducing search time and improving selection efficiency through intelligent default prioritization.
Pattern created by @haydenbleasel
Installation
Related patterns you will also like
With Quick Filters
Badge-based category filtering
Grouped Combobox
Category-based grouping without recents
With Footer Actions
Management actions in footer
Standard Combobox
Basic ungrouped combobox
Create New Option Inline
Dynamic item creation
Command Palette
Keyboard command navigation
Questions you might have
React Combobox - With Footer Actions
A React combobox with footer action button using Settings icon and CommandSeparator for management links below selection list with shadcn/ui
React Combobox - Async/Dynamic Search
A React combobox with async dynamic search using Loader2 spinner, useEffect debouncing, and shouldFilter false for API-driven results with shadcn/ui