JSFiddle - React, Tailwind, and code Playground
HTML
Buy
<span class="closeform">
<input type="text" name="eggs" onclick="window.showname(this);"/>
</span>
tomorrow.
CSS
.closeform{
width: 70px;
}
.closeform input {
width: 70px;
}
.closeform button {
width: 70px;
}
JavaScript
function showname(el){
el.value = el.name;
}