JSFiddle - React, Tailwind, and code Playground

HTML

<div class = "wrappert">
<div class = "wrapper">
<div class="container">
<div class="item"></div>
</div>
</div>
</div>

CSS

body, html {
 height: 100%;   
}
.container{
    position: relative;
    width: 300px;
    height: 300px;
    background-color: red;
    margin:auto;
}

.item{
    position: absolute;
    width: 100px;
    height: 100px;
    background-color: blue;
    left:0;
    right:0;
    top:0;
    bottom:0;
    margin: auto;
}
.wrappert {
 height: 100%; 
 width: 100%;
display: table;    
}
.wrapper {
    height: 100%;
    vertical-align: middle;
    display: table-cell;
    text-align: center;
}