elements
Link
Render a NuxtLink but with superpowers.
Usage
The Link component is a wrapper around <NuxtLink>
through the custom
prop that provides a few extra props:
inactive-class
prop to set a class when the link is inactive,active-class
is used when active.exact
prop to style withactive-class
when the link is active and the route is exactly the same as the current route.exact-query
andexact-hash
props to style withactive-class
when the link is active and the query or hash is exactly the same as the current query or hash.
The incentive behind this is to provide the same API as NuxtLink back in Nuxt 2 / Vue 2. You can read more about it in the Vue Router migration from Vue 2 guide.
It also renders an <a>
tag when a to
prop is provided, otherwise it renders a <button>
tag.
It is used underneath by the Button, Dropdown and VerticalNavigation components.