Black Friday: 30% off Pro

Get 30% off

Rolling Word

Preview

Customize

Duration0.45s
Exit duration0.35s
Stagger0.030s
Text size48px

Installation

npx shadcn@latest add https://uibrik.com/r/rolling-word.json
Adds the files to components/uibrik/rolling-word and installs motion and react-use-measure. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/rolling-word.

Usage

import { RollingWord } from "@/components/uibrik/rolling-word/rolling-word";​<RollingWord  play={0}  prefix="Build something"  words={["calm", "honest", "lasting", "yours"]}  duration={0.45}  exitDuration={0.35}  stagger={0.03}/>

Where to use Rolling Word

  • Rotating headlines

    One word rolling to the next like a drum lets a headline speak to several audiences.

    Pairs with Anagram Shuffle

  • "Built for" taglines

    A rolling slot works for lines like "Built for designers, developers and teams".

  • Section titles

    A single changing word keeps a title short while covering several use cases.

Props

RollingWord
prefix
Type string
"Build something"
Fixed text before the rolling word.
words
Type string[]
["calm","honest","lasting","yours"]
Cycled through, one per play.
duration
Type number
0.45
Time for a letter to roll in.
exitDuration
Type number
0.35
Time for a letter to roll out.
stagger
Type number
0.03
Delay between letters.
playrequired
Type number
–
Each change plays the effect again; 0 shows its resting state.
className
Type string
–
Classes for the line, merged over the defaults.