# Vertical text swap (B 116)

Category: Buttons  
Tags: text-swap, slide, rectangle, two-labels  
Page: https://designforai.dev/snippet/btn-116

## 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.

## HTML

```html
<button class="btn-116"><span data-alt="On my way">Get started</span></button>
```

## CSS

```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
}
```
