JSFiddle - React, Tailwind, and code Playground

HTML

<input id="browser-resolution" name="resolution" value="">

JavaScript

document.getElementById('browser-resolution').value = screen.width + "x" + screen.height;