JSFiddle - React, Tailwind, and code Playground
HTML
<input type="button" class="login-form-showchars" value="Show">
JavaScript
$('.login-form-showchars').on('click', function()
{
var target = $('.login-form-password'), $this = $(this);
target.attr('type', function(i, oldType)
{
this.type = oldType == 'password' ? 'text' : 'password';
$this.val(this.type == 'text' ? 'Hide' : 'Show');
});
})