Solution
To disabled ant design button in react js, first install ant design library using npm install antd
command import and use button
component from it. By setting disabled
prop to true, there will be no response on clicking the button.
Snippet
In this snippet, see the short example to use button
component of ant design library. with the use of disabled
prop, We will make the button unclickable. To make the color of the button blue, set the type to primary
.
<Button disabled type="primary">
Go TO ReactJsSnippet
</Button>
Example
In this example, we will import the button
component from the ant library. use the of disabled
prop,We will make the button unclickable 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 disabled type="primary">
Go TO ReactJsSnippet
</Button>
);
}
Output
Links
Here, we are provided code sandbox links for the above program disabled ant design button. Then you can use whenever you went and do the changes as per your requirements.
Happy Coding,
I hope the above example with help you to do your task.