Ariakit
/

useTabContext

Returns the tab store from the nearest tab container.

Code examples

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