Solution

To make button as link in ant design in react js, first, install ant design library using npm install antd command import and use the button component with href attribute and put your link in href attribute value. The button component will behave like a link.

Snippet

In this snippet, see the short example to use button as link component of ant design library, with href attribute and put your link in href attribute value.

<Button href={"https://reactjssnippet.com/"} type="primary">
  Go TO ReactJsSnippet
</Button>

Example

In this example, we will import the button component from the ant library, with href attribute, and put your link in href href={"https://reactjssnippet.com/"}. Use button component as a primary type of ant design library.

Let’s start coding…

App.js

import { Button } from "antd";

export default function ComboBox() {
  return (
    <Button href={"https://reactjssnippet.com/"} type="primary">
      Go TO ReactJsSnippet
    </Button>
  );
}

Output

Ant-design, button

Here, we are provided code sandbox links for the above program make button as link in ant design. Then you can use whenever you went and do the changes as per your requirements.

codesandbox

Happy Coding,

I hope the above example with help you to do your task.