In this article, we will learn how to create Autocomplete Dropdown in React Application using Material UI.
Prerequisites of React
- Familiarity with the HTML, JavaScript.
- node.js installed
- Basic knowledge of React JS
- Visual Studio Code
Create React Project
To create a React app, use the following command in the terminal.
Open the newly created project in Visual Studio Code, and install Material-UI; run the following command in your React project's root directory.
Now right-click on the src folder and create a new component named 'Autocomplete.js'. We will create a simple modal popup using material UI. Import the following component from Material UI in the Autocomplete.js file.
Now, add the following code in the Autocomplete.js file.
In the above code, we have added material ui autocomplete and created dummy data to show in the autocomplete dropdown.
Now, import the Autocomplete component in the src/App.js file.
Run the project using the 'npm start' command and check the result.
![Output Image]()
Summary
This article provides a step-by-step guide on creating Autocomplete Dropdown in React application using the Material UI library.