Rolling Text

Letters roll up one by one on hover. Pure CSS, zero JavaScript.

no dependenciesMIT · free

Installation

npx shadcn@latest add https://ombakui.com/r/rolling-text.json

Usage

import { RollingText } from "@/components/rolling-text";

// add "group/roll" to the link so hovering anywhere on it rolls the text
<a href="/work" className="group/roll">
  <RollingText text="Work" />
</a>

Props

PropTypeDefaultDescription
text*string–Plain text to roll.
asElementType"span"HTML tag to render.
staggernumber18Milliseconds between letters.
durationnumber450Milliseconds per letter.
classNamestring–