Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable multiple options selection in headless-ui combobox/autocomplete?

I am using headless-UI combobox/autocomplete.I would like to enable multiple options selections with this component. Can anyone tell me, how can we achieve this?

like image 235
Aishwarya Neelakandan Avatar asked Sep 12 '25 23:09

Aishwarya Neelakandan


1 Answers

Use the multiple prop word. An array will be passed to value instead of a single option:

<Combobox value={selectedPeople} multiple>

Link: https://headlessui.com/react/combobox#selecting-multiple-values

like image 113
WnaJ Avatar answered Sep 14 '25 12:09

WnaJ