Text swap slide

Text swap slide: a CSS button. Copy the rules, or the prompt that rebuilds it.

hover-filltext-swapslide-upsolid

CSS
.btn-064 {
  position: relative;
  overflow: hidden;
  font: 600 14px/1 system-ui,sans-serif;
  color: #fff;
  background: #2563eb;
  border: 0;
  border-radius: 8px;
  padding: 0;
  cursor: pointer;
  transition: background .2s
}
.btn-064 span {
  display: block;
  padding: 12px 24px;
  transition: transform .25s
}
.btn-064 span::after {
  content: attr(data-hover);
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  padding: 12px 0;
  text-align: center
}
.btn-064:hover span {
  transform: translateY(-100%)
}
.btn-064:hover {
  background: #1d4ed8
}
.btn-064:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 3px
}
.btn-064:active {
  background: #1e40af
}
HTML
<button class="btn-064"><span data-hover="Let's go">Get started</span></button>
Prompt

A solid blue #2563eb button with white 14px semibold text, 8px radius, 12px by 24px padding. On hover the label slides up out of view and a second label (from a data-hover attribute, e.g. "Let's go") slides up from below to replace it (250ms), while the background goes #1d4ed8. Active #1e40af. Focus outline 2px blue.