JSFiddle - React, Tailwind, and code Playground

by markstory

HTML

<div class="admonition">
    <div class="admonition-title">Note</div>
    <p>The content goes here</p>
</div>

CSS

.admonition {
    position: relative;
    padding: 23px 10px 22px;
    margin: 20px;
    background: #fffdf2;
    border: 2px solid #ffcb00;
    font-family: Helvetica, Arial;
}
.admonition-title {
    position: absolute;
    top: -10px;
    left: -10px;
    padding: 4px 8px;
    background: #df9c00;
    color: #fff;
    -webkit-box-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    -moz-box-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    box-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}
.admonition-title:after {
    content: '';
    display: block;
    height: 20px;
    width: 8px;
    position: absolute;
    top: 24px;
    left: 0px;
    background: transparent;
    z-index: -1;
    border-top: 45px solid #eed993;
    border-left: 45px solid transparent;
}