Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react router active link css

<NavLink
          key={tab.id}
          className={(navData) =>
            navData.isActive ? styles.activeTab : styles.inactiveTab
          }
          to={tab.path}
        >
          {tab.name}
        
</NavLink>
Source by v5.reactrouter.com #
 
PREVIOUS NEXT
Tagged: #react #router #active #link #css
ADD COMMENT
Topic
Name
4+8 =