Rotating Text

One word swaps for the next in place — a compact way to cycle a few phrases in a headline. One rotator per view; short words. Under prefers-reduced-motion it swaps text with no travel.

xpert-ai Updated 10 repo stars

File contents

rotating-text

A word that cycles in place. Dependency-free, reduced-motion safe.

How to apply

Copy css+js; <span class="rot" data-words="a|b|c">a</span>.

xpert-ai/xpert-plugins commit 0675df4b9e

Frequently asked questions

npx get-skill add xpert-ai/rotating-text