SlotText

Each letter is a slot reel that spins through random letters and lands on the right one, left to right. Text.

Open playground

About

SlotText 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 { SlotText } from "@ashutoshswamy/smoui" and set text, spins, replayOnHover.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

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

<SlotText text="Lucky draw" className="text-4xl font-semibold" />

Props 3

text

Final text.

string
spins

Rows each letter spins through.

numberdefault 7
replayOnHover

Replay when the pointer enters.

booleandefault true