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...
}

Follow updates

Join 1,000+ subscribers and receive monthly updates with the latest improvements on API Reference.

Read latest issue

No Spam. Unsubscribe at any time.