Ariakit
/

useSelectContext

Returns the select store from the nearest select container.

Code examples

function Select() {
const store = useSelectContext();
if (!store) {
throw new Error("Select must be wrapped in SelectProvider");
}
// 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