Answers for "router-link-exact-active css"

2

react router active link css

<NavLink
          key={tab.id}
          className={(navData) =>
            navData.isActive ? styles.activeTab : styles.inactiveTab
          }
          to={tab.path}
        >
          {tab.name}
        
</NavLink>
Posted by: Guest on December-14-2021
0

active-class router-link

//when a route is active we can use this to add a certain style to the element:
<router-link to="/[route-name]" active-link="active'> <router-link>

//when the route is active, active-link will add the class active to the element
//you can define then a certain style for elements that contain the class active
Posted by: Guest on October-31-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language