HelixOverviewComponentsMapsGraphIntroductionInstallationDeriving a themeSandboxTheme builderVisual testingCortexDocsEngramActiveTraceActiveRecallActiveServicesInsightsGet in touchSource on GitHub
Loading the reference
Rotating TextView sourceEdit in SandboxView MarkdownCopy MarkdownOpen in ClaudeOpen in CursorA word in a line of text that turns through others in its place, one at a time.Also called Rotating words, Word rotator, Flip words, Typewriter, and Changing word.ExperimentalSince 0.241.0ContentImportimport'@fusion.dev/helix/rotating-text'Preview
API referenceRoothelix-rotating-textA word in a line of text that turns through others in its place, one at a time.
PropTypeDescriptionintervalnumberDefault2500How long each word shows, in milliseconds, or as 2.5s.
ReadTypeDescriptionwhenSettledPromise<void>Resolves a frame after the first update, when transitions are switched on.
SlotDescription(default)The words, each in an element of its own.
MethodTypeDescriptionturn() => voidShows the next word, and has the one showing leave.
CSS PropertyDescription--rotating-text-distanceHow far below its place a word waits, and above it a word leaves to. Defaults to 0.6em.
Custom stateDescriptionleave-1The first word is leaving.leave-2The second word is leaving.leave-3The third word is leaving.leave-4The fourth word is leaving.leave-5The fifth word is leaving.leave-6The sixth word is leaving.pausedThe page's motion is paused, so the word showing stays.rotatingThe words have begun to turn, so the word showing is the one a show- state names.settledSet one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.show-1The first word is showing.show-2The second word is showing.show-3The third word is showing.show-4The fourth word is showing.show-5The fifth word is showing.show-6The sixth word is showing.
Examples
NameDescriptionPreviewA headline whose last word turns through three in its place.