How to use the @material/tab-bar/index.MDCTabBar function in @material/tab-bar

To help you get started, we’ve selected a few @material/tab-bar examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github material-components / material-components-web-catalog / src / hero / HeroComponent.js View on Github external
initTabBar = (tabBarEl) => {
    if (!tabBarEl) return;
    const tabBar = new MDCTabBar(tabBarEl);
    tabBar.listen('MDCTabBar:activated', (evt) => {
      const activeIndex = evt.detail.index;
      this.setState({activeIndex});
    });
  }
github material-components / material-components-web-catalog / src / TabsCatalog.js View on Github external
initTabBar = (tabBarEl) => {
    if (!tabBarEl) return;
    this.tabBar = new MDCTabBar(tabBarEl);
  };