# Text-Swap Slide (B 064)

Kategorie: Buttons  
Tags: hover-fill, text-swap, slide-up, solid  
Seite: https://designforai.dev/de/snippet/btn-064

## Prompt

Ein blauer #2563eb Button mit weißem Text 14px semibold, 8px Radius, 12px mal 24px Padding. Beim Hover gleitet das Label nach oben aus dem Sichtfeld und ein zweites Label (aus einem data-hover Attribut, z.B. "Let's go") gleitet von unten nach, um es zu ersetzen (250ms), während der Hintergrund auf #1d4ed8 geht. Active #1e40af. Fokus-Outline 2px Blau.

## HTML

```html
<button class="btn-064"><span data-hover="Let's go">Get started</span></button>
```

## CSS

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