JSFiddle - React, Tailwind, and code Playground

by Ajax30

HTML

<ul class="cips">
  <li>Lorem ipsum <span class="remove">&times;</span></li>
  <li> Cupiditate voluptates <span class="remove">&times;</span></li>
</ul>

CSS

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

ul {
  display: flex;
  flex-wrap: wrap;
  position: relative;
  font-size: 13px;
  font-weight: 600;
}

ul li {
  display: inline-block;
  border-radius: 99px;
  background: #E3E3E3;
  padding: 0 10px;
  line-height: 28px;
  height: 28px;
  width: auto;
  transition: all 0.3s ease-in-out;
  white-space: nowrap;
  margin: 2px 4px 2px 0;
  box-sizing: border-box;
}

 ul li span {
  display: none;
  width: 18px;
  line-height: 18px;
  margin-top: 2px;
  cursor: pointer;
  border-radius: 50%;
  justify-content: center;
  font-weight: 500;
  background: #c00;
  color: #fff;
}

ul li:hover .remove {
  display: inline-flex;
}