Skip to content

vue-router / RouterLinkProps

RouterLinkProps

Extends

  • RouterLinkOptions

Properties

activeClass?

ts
optional activeClass: string;

Class to apply when the link is active


ariaCurrentValue?

ts
optional ariaCurrentValue: "time" | "location" | "page" | "step" | "date" | "true" | "false";

Value passed to the attribute aria-current when the link is exact active.

Default Value

'page'


custom?

ts
optional custom: boolean;

Whether RouterLink should not wrap its content in an a tag. Useful when using v-slot to create a custom RouterLink


exactActiveClass?

ts
optional exactActiveClass: string;

Class to apply when the link is exact active


replace?

ts
optional replace: boolean;

Calls router.replace instead of router.push.

Inherited from

ts
RouterLinkOptions.replace

to

ts
to: 
  | string
  | RouteLocationAsRelativeGeneric
  | RouteLocationAsPathGeneric;

Route Location the link should navigate to when clicked on.

Inherited from

ts
RouterLinkOptions.to

viewTransition?

ts
optional viewTransition: boolean;

Pass the returned promise of router.push() to document.startViewTransition() if supported.

Released under the MIT License.