Combo box in NextJS

31 Views Asked by At

What is the simplest way to use a combo box in a NextJS web app?

Though the question looks basic, I have looked on the net but did not find any simple and working solution.

1

There are 1 best solutions below

0
George Alexander On

You could try using the MUI's Autocomplete component.

"The autocomplete is a normal text input enhanced by a panel of suggested options. The widget is useful for setting the value of a single-line textbox in one of two types of scenarios:

  1. The value for the textbox must be chosen from a predefined set of allowed values, for example a location field must contain a valid location name: combo box.
  2. The textbox may contain any arbitrary value, but it is advantageous to suggest possible values to the user, for example a search field may suggest similar or previous searches to save the user time: free solo."