JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" value="[Your Name]" />

CSS

input {
    color : grey;
}
input.active {
    color : black;
}

JavaScript

$('input').on('click', function () {
    $(this).select();
}).on('keyup', function () {
    if (this.value == '' || this.value == '[Your Name]') {
        this.className = '';
        this.value = '[Your Name]';
    } else {
        this.className = 'active';
    }
});