JSFiddle - React, Tailwind, and code Playground

HTML

<input id="hiddenname" type="hidden" value="secret value" /><br />
<a href="#" id="showLink">Show me the hidden field!</a>

JavaScript

$(function() {
    $('#showLink').click(function() {
        $newBox = $('<input id="name" type="text" />').val($('#hiddenname').val());
        $('#hiddenname').after($newBox).remove();
    });
});