JSFiddle - React, Tailwind, and code Playground
HTML
<div><span></span>design</div>
CSS
body { background: red; }
div {
margin: auto;
width: 150px;
height: 50px;
background: #fff;
text-align: center;
line-height: 50px;
position: relative;
border-radius: 0 5px 5px 0;
}
div:before {
content: '';
position: absolute;
border: 25px solid transparent;
border-right: 25px solid #fff;
top: 0;
right: 100%;
}
div span {
position: absolute;
width: 10px;
height: 10px;
border-radius: 50%;
background: blue;
top: 50%;
left: 0;
margin-top: -5px;
cursor: pointer;
}
JavaScript
document.querySelector('div span').onclick = function() {
this.parentNode.style.display = 'none';
}