WordRoll

Words roll through a line, each sliding in as the last slides out. Text.

Open playground

Built for

About

WordRoll is a React component in the Text category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { WordRoll } from "@ashutoshswamy/smoui" and set words, interval.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { WordRoll } from "@ashutoshswamy/smoui";

<p className="text-3xl">
  Built for <WordRoll words={["designers", "tinkerers", "details"]} />
</p>

Props 2

words

Words to cycle.

string[]
interval

Seconds per word.

numberdefault 2.2