JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text">
<a href="">Disable</a>
CSS
a {
display: flex;
justify-content: center;
align-items: center;
text-decoration: none;
color: #fff;
font-size: 19px;
width: 200px;
height: 50px;
background: red;
-webkit-border-radius: 7px;
-moz-border-radius: 7px;
border-radius: 7px;
}
input {
width: 400px;
height: 40px;
margin-bottom: 30px;
}
JavaScript
document.querySelector('a').addEventListener('click', (e) => {
e.preventDefault();
document.querySelector('input').setAttribute('disabled', 'disabled')
})