JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" readonly value="blah">

JavaScript

$('input').on('click', function(e) {
    $(this).select();
});