JSFiddle - React, Tailwind, and code Playground

by Brodingo

HTML

<div class="preview"></div>

CSS

body {
    background-color: gainsboro;
    font-family: Arial, sans-serif;
}

.preview {
    position: fixed;
    top: 40px;
    right: -150px;
    width: 200px;
    height: 300px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,.2);
    -webkit-transition: all 1s ease;
       -moz-transition: all 1s ease;
        -ms-transition: all 1s ease;
         -o-transition: all 1s ease;
            transition: all 1s ease;
}

.preview:hover {
    right: 0;
}

.preview:before {
    content: 'PREVIEW';
    position: absolute;
    left: -50px;
    bottom: 100%;
    width: 100px;
    background-color: #fff;
    text-align: center;
    line-height: 2;
    border-radius: 4px 4px 0 0;
    box-shadow: 0 -4px 4px -2px rgba(0,0,0,.1);
    -webkit-transform: rotate(-90deg) translateX(-150px);
       -moz-transform: rotate(-90deg) translateX(-150px);
        -ms-transform: rotate(-90deg) translateX(-150px);
         -o-transform: rotate(-90deg) translateX(-150px);
            transform: rotate(-90deg) translateX(-150px);
    -webkit-transform-origin: bottom center;
       -moz-transform-origin: bottom center;
        -ms-transform-origin: bottom center;
         -o-transform-origin: bottom center;
            transform-origin: bottom center;
}