ComponentsEffects
Rolling text
A value that rolls into place when it changes
Idle
Installation
nub add @gpuixui/componentsUsage
import { RollingText } from "@gpuixui/fx/rolling-text";
<RollingText text={String(deploys)} role="display" />;API
| Prop | Type | Default |
|---|---|---|
text | string | — |
direction | "up" | "down" | "up" |
level | MotionLevel | "normal" |
role | TextRole | "body" |
className | string | — |
style | StateStyle<RollingTextState> | — |
A value that keeps changing
The swap is timed from the exit the change started, not from the newest value: a value arriving mid-exit replaces the pending one, and the window is the exit half of level, so a live counter — a value updated faster than one swap — still commits a swap every window and shows a newer value instead of emptying the clip. Once the changes stop, the last value is the one that paints.
Under MotionProvider preference="reduced" the swap is immediate, so there is no window to wait.
Edit this page on GitHubpackages/fx/docs/rolling-text.mdx