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

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.