JSFiddle - React, Tailwind, and code Playground

HTML

<div id="size"></div>

CSS

#test {
	box-shadow: 5px 5px 25px #000;
	position: absolute;
	top: 100px;
	left: 100px;
	height: 100px;
	width: 100px;
}

JavaScript

$(window).on('resize', showSize);
showSize();
function showSize() {
  $('#size').show();
	$('#size').html($(window).height() + 'px x ' + $(window).width() + 'px');
  setTimeout(function(){
      $('#size').fadeOut();
  }, 1000);
}