JSFiddle - React, Tailwind, and code Playground

HTML

<input id='thebox' type='text' disabled="disabled" value='locked'>
<button id='thebutton'>The Button</button>

JavaScript

$('#thebutton').click(function(){
    $('#thebox').removeAttr('disabled');
    $(this).html('save');
})