JSFiddle - React, Tailwind, and code Playground
HTML
<div class="wrap">
<div class="center"></div>
</div>
CSS
.wrap{
width: 400px;
height: 400px;
background-color: #add8e6;
position: relative;
}
.center{
width: 100px;
height: 100px;
position: absolute;
background-color: #FFF;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}