102

Rolling Text Button

On hover, letters roll up, the button inverts and the arrow turns

ButtonHover & clickUI interactionEmphasisCSSCSS hover

Hannah's Motion Library
Web motion effects × AI prompts

AI prompt

A pill button with text on the left and a round arrow on the right. On hover, each letter of the label rolls upward in turn (about 0.035 s delay per letter) while an identical copy rolls in from below; at the same time the button's background and text colors swap to the accent scheme, the circle on the right inverts too, and the arrow turns 45° to point up-right. On leaving, everything rolls back. About 0.55 s with ease-in-out (cubic-bezier(.7,0,.2,1)). (CSS: wrap each letter in a span and use ::after{content:attr(data-t);top:100%} for the second copy, outer overflow:hidden, translateY(-100%) on :hover, transition-delay calc(var(--i)*.035s) for the stagger)

When you copy it, a note to “match the site’s existing theme colors” is added automatically, so you don’t need to specify colors.

How to use it

  1. Tap “Copy AI prompt”.
  2. Paste it into an AI such as ChatGPT or Claude, and tell it which element on your site to apply it to (for example, the homepage headline or a buy button).
  3. The AI writes code that matches your site’s colors. Paste it into your project, then fine-tune the timing and distances.

More button effects

346 more motion effectsText, buttons, cards, backgrounds, cursors… preview them all and copy AI prompts

Browse all effects →