In my navbar i added an activeclass so in case a link was chosen a line at the bottom of the link is displayed , im trying to add a transition property to this class change , preferably the line animating from one link to another , i tried it the way below but its not working , i appreciate your feedback.
this is the css part
page: {
marginLeft: theme.spacing(3),
textTransform: "capitalize",
color: theme.palette.text.primary,
textDecoration: "none",
borderBottom: "none",
transition: "borderBottom 2s ease",
},
activepage: {
marginLeft: theme.spacing(3),
textTransform: "capitalize",
color: theme.palette.text.primary,
textDecoration: "none",
borderBottom: "3px solid #000",
},
and below is the jsx part
<Box className={classes.pages}>
{pages.map((page) => (
<NavLink
to={page.path}
key={page.name}
className={({ isActive }) =>
isActive ? `${classes.activepage}` : `${classes.page}`
}
>
{page.name}
</NavLink>
))}
</Box>