[Feature Request] easy way to disable "active" for buttons and v-list-items etc
See original GitHub issueProblem to solve
I can see how the “active” router-link works for some sites, but it isn’t universal and when it doesn’t apply, it is a pita to disable. I would like to request an easy way to disable the active route tracking on all the items that have an active-class option.
Here is the problem, I do not want active links on any of my links, not even the main nav bar. It just doesn’t fit the structure of my app. But to disable it, I have to define two a class like this:
.navbar__btn_active::before {
background-color: transparent;
}
which took me a while to figure out that I actually needed the ::before. Then I added a v-menu to one of the navbar buttons. Now each of the items in that v-menu lights up as being active when on a certain screen. This is even harder to figure out how to turn off the active tracking on these. I can add in my custom active-class, but that gets rid of the hover highlighting. 😦
So I have to create another css class:
.navbar__btn_active:hover::before {
background-color: currentColor !important;
}
And after this, the hover highlight colour is different when I am on the matching page or not. When I am not on the matching page, the hover highlight colour is very faint. But when I am on the matching page, the hover colour is darker and more visible. (I prefer the darker version, BTW. the faint hover is too faint).
Anyway, this is a lot of finicky class setup that I am going to have to do all over my site. It would be a lot easier if the objects had a prop that could turn off the active tracking. I have seen
Proposed solution
Anyway, this is a lot of finicky class setup that I am going to have to do all over my site. It would be a lot easier if the objects had a prop that could turn off the active tracking.
a prop like “no-active-tracking” or something shorter would be a very welcome addition to buttons, v-list-items and whatever else tracks the active router link.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:14
- Comments:7 (1 by maintainers)
With Vuetify 3 this is done slightly differently (unfortunately still the same workaround)
Yea, unfortunately that is what I have had to do. Hopefully with Vuetify 3, John and company will take my suggestion to heart and provide a route button and a normal button so that we don’t have to deal with the active crap.