Ariakit
/

useComboboxContext

Returns the combobox store from the nearest combobox container.

Code examples

function Combobox() {
const store = useComboboxContext();
if (!store) {
throw new Error("Combobox must be wrapped in ComboboxProvider");
}
// Use the store...
}

Stay tuned

Join 1,000+ subscribers and receive monthly tips & updates on new Ariakit content.

No spam. Unsubscribe anytime. Read latest issue