Nuxt 3 beta is out! Discover more about it on v3.nuxtjs.org

Discover
Showcases
Showcases

Selection of websites built with Nuxt

Case studies
Case studies

How companies use Nuxt

Testimonials
Testimonials

What they think about us

Learn
Docs
Docs

Create fast websites easily

Examples
Examples

Understand everything in Nuxt

Tutorials
Tutorials

Learn with concrete cases

Master courses
Master courses

Learn more with experts

Explore
Deployments
Deployments

How to Deploy Nuxt

Modules
Modules

Extend the power of Nuxt

Themes
Themes

Get started with themes

Video Courses
Video Courses

Learn step by step

Community
Announcements
Announcements

Latest news about Nuxt

Teams
Teams

They are Nuxt

Releases
Releases

All the code we have released

Sponsors
Sponsors

They trust us

Partners
English
Français
日本語
  • Routing
    • Hello World
    • Active Link Classes
    • Dynamic Pages
    • Nested Pages
  • Data Fetching
  • Assets Management
  • Transitions
  • Seo
  • Loading
  • Miscellaneous
  • Middlewares
  • Plugins
  • Modules
English
Français
日本語
  • Routing
    • Hello World
    • Active Link Classes
    • Dynamic Pages
    • Nested Pages
  • Data Fetching
  • Assets Management
  • Transitions
  • Seo
  • Loading
  • Miscellaneous
  • Middlewares
  • Plugins
  • Modules

Active Link Classes

Change the default NuxtLink classes and style the active and exact active classes as well as disable prefetch for a specific link


In this example:

layouts/default.vue shows the styles for nuxt-link-active and nuxt-link-exact-active.

Learn more about vue routers active and exact active classes.
Learn more about active classes in the Features book in the Nuxt Components chapter.
Loading Sandbox...
Edit this page on GitHub Updated at Tue, Jan 25, 2022
Hugo Torzuoli Hugo Torzuoli Sylvain Marroufin Sylvain Marroufin Sébastien Chopin Sébastien Chopin felipesuri felipesuri Kareem Dabbeet Kareem Dabbeet tramplay tramplay Daniel Roe Daniel Roe Clément Ollivier Clément Ollivier verebelyicsaba verebelyicsaba Adam Adam Nate Butler Nate Butler Sandra Rodgers Sandra Rodgers Arpit Patidar Arpit Patidar Matthew Kuehn Matthew Kuehn Steven DUBOIS Steven DUBOIS Travis Lindsey Travis Lindsey syagawa syagawa Maxime Maxime かる かる Al Power Al Power Florent Delerue Florent Delerue José Manuel Casani Guerra José Manuel Casani Guerra Unai Mengual Unai Mengual kazuya kawaguchi kazuya kawaguchi Michael Lynch Michael Lynch Tomachi Tomachi pooya parsa pooya parsa Shek Evgeniy Shek Evgeniy Meir Roth Meir Roth Brett Brett Adam Miedema Adam Miedema Thomas Bnt Thomas Bnt Kazuki Furukawa Kazuki Furukawa Anthony Ruelle Anthony Ruelle Christophe Carvalho Vilas-Boas Christophe Carvalho Vilas-Boas Roman Harmyder Roman Harmyder dianhenglau dianhenglau Michael Gallagher Michael Gallagher Jérôme Pott Jérôme Pott Bettad Bettad

A landscape image A landscape image

About

  • Contact us
  • Enterprise support
  • NuxtLabs company
  • Open Source Software
  • Partnerships
  • Telemetry

Ecosystem

  • Announcements
  • Contribute
  • Chat with us
  • Events
  • Sponsors
  • Teams
  • Tutorials
  • Video courses

Resources

  • Design
  • Documentation
  • Examples
  • Deployments
  • Master courses
  • Modules
  • Releases
  • Showcases
  • Themes

Newsletter

The latest news, articles, and resources, sent to your inbox monthly.