JSFiddle - React, Tailwind, and code Playground
HTML
<input type="password" value="seeecret"><button>afficher</button>
JavaScript
$('button').on('click', function(){
$('input').css('color','red').attr('type','text');
});
<input type="password" value="seeecret"><button>afficher</button>
$('button').on('click', function(){
$('input').css('color','red').attr('type','text');
});