JSFiddle - React, Tailwind, and code Playground

HTML

<div id="editor" contenteditable="true" class="container" />

CSS

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

.container {
  position: relative;
  height: 135px;
  width: 100%;
  border: 10px;
  margin-bottom: 5px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.container:before,
.container:after {
  position: absolute;
  bottom: 0;
  content: '';
}

.container:before {
  left: 0;
  height: 1px;
  width: 100%;
  background: #e0e0e0;
  border-bottom: solid 1px rgba(0, 0, 0, .2);
  z-index: 1;
}

.container:after {
  position: absolute;
  left: 50%;
  height: 3px;
  width: 0;
  background: blue;
  border: 3px;
  transition-duration: 0.2s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); 
  transform: translateX(-50%);
  z-index: 2;
}

.container:focus {
  outline: 0;
}

.container:focus:after {
  width: 100%;
}