Vertical text swap

Vertical text swap: a CSS button. Copy the rules, or the prompt that rebuilds it.

text-swapsliderectangletwo-labels

CSS
.btn-116 {
  position: relative;
  overflow: hidden;
  font: 600 15px/1 system-ui,sans-serif;
  color: #fff;
  background: #111827;
  border: 0;
  border-radius: 8px;
  padding: 0 24px;
  height: 46px;
  cursor: pointer
}
.btn-116 span {
  display: block;
  line-height: 46px;
  transition: transform .3s cubic-bezier(.4,0,.2,1)
}
.btn-116 span::after {
  content: attr(data-alt);
  display: block;
  line-height: 46px;
  color: #a5b4fc
}
.btn-116:hover span {
  transform: translateY(-46px)
}
.btn-116:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 3px
}
.btn-116:active {
  background: #000
}
HTML
<button class="btn-116"><span data-alt="On my way">Get started</span></button>
Prompt

A dark #111827 button, 8px radius, fixed 46px height, white 15px semibold text with 24px side padding. The label sits in an overflow-hidden box; on hover it slides up out of view and a second label (from a data-alt attribute, coloured #a5b4fc) slides in from below over 300ms. Active darkens to black. Focus 2px dark outline offset 3px.