Skip to content

Allow custom component for button links #260

Closed

Description

@mikemonteith

I can pass a custom component to the back link, to get it to use react-router's Link.

import { BackLink } from "nhsuk-react-components";
import { Link } from "react-router-dom";
...

<BackLink asElement={Link} to="..">
  Back
</BackLink>

It would be nice if <ButtonLink> also supported this.

Activity

  1. colinrotherham commented on Sep 26, 2025

    @colinrotherham
    Collaborator

    This is closed by #267

  2. added this to the v6.0.0 milestone on Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions