Ariakit
/

useCheckboxContext

Returns the checkbox store from the nearest checkbox container.

Code examples

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