Skip to content

Allow defining an inactive-class #2648

Open
@christhofer

Description

@christhofer

What problem does this feature solve?

We already have prop active-class that will be appended to the element when the route is active.
But what if that we need to specify class only when the route is not active?

example:
when active => .btn-primary
when inactive => .btn-secondary

What does the proposed API look like?

<router-link
    :to="{name: 'purchase'}"
    class="btn"
    active-class="btn-primary"
    inactive-class="btn-secondary">
    Purchase
</router-link>

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionfeature requestgroup[router-link redesign]Issues regarding a redesign in current router-link implementation to make it make it more customizabhas PRneeds RFCThis feature request needs to go through the RFC process to gather more information

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions