Frontendx
README.md
SOLUTION.md
main.tsxentry
App.tsx
App.css
index.html
vite.config.ts
Installed
react@^19.2.0
react-dom@^19.2.0

Create a Reusable Select Dropdown Component with Search in React — Accessible Searchable Dropdown with Virtualized List and Multi-Select

Prompt

Build a production-grade reusable dropdown/select component with built-in search functionality. The component must be modular and reusable, with performance optimization for large datasets. Features: a trigger input that opens a popup panel on click, a search box inside the popup that filters options in real-time, a virtualized options list (only render visible options) for handling large datasets, single and multi-select modes, keyboard navigation (arrow up/down, Enter to select, Escape to close), ARIA attributes for accessibility, and a clear selection button. The component should be decomposed into sub-components: Trigger, Popup, SearchBox, OptionsList. This was asked in Razorpay's frontend interview with multiple performance-focused follow-up questions.

Decompose into Trigger, Popup, SearchBox, OptionsList sub-components sharing state via context.
Test Results

Create a Reusable Select Dropdown Component with Search in React — Accessible Searchable Dropdown with Virtualized List and Multi-Select

Build a production-grade reusable dropdown/select component with built-in search functionality. The component must be modular and reusable, with performance optimization for large datasets. Features: a trigger input that opens a popup panel on click, a search box inside the popup that filters options in real-time, a virtualized options list (only render visible options) for handling large datasets, single and multi-select modes, keyboard navigation (arrow up/down, Enter to select, Escape to close), ARIA attributes for accessibility, and a clear selection button. The component should be decomposed into sub-components: Trigger, Popup, SearchBox, OptionsList. This was asked in Razorpay's frontend interview with multiple performance-focused follow-up questions.