Skip to content
Premium & Brand

Typing Text

A typewriter that types one or more phrases with a blinking caret.

Import

tsx
import { TypingText } from "@cronus-ui/ui";
bash
npx cronus-ui add typing-text

Examples

.cronus

The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.

PortedParity: MatchGeometry 1/1Pixel diff 0 pxLogic 1/1Parity scoreboard
default.cronus
app "audit-fixtures" {
  port 5176
}

style {
  preset aurora
  theme dark
}

component TypingTextDefault layout:inline style:typing-text {
  label "Shipping"
}

page "/audit/typing-text/default" type:custom {
  use TypingTextDefault
}

API Reference

Generated from the component's exported types.

TypingTextProps

Extends Omit<HTMLAttributes<HTMLSpanElement>, "children">

Skip TypingTextProps props table
PropTypeDefaultDescription
ref
Ref<HTMLSpanElement>—Ref forwarded to the underlying DOM node.
text*
string | string[]—Phrases to type. A single string is treated as one phrase. When more than one is provided the component types, pauses, deletes, and moves on.
typingSpeed
number50Milliseconds per typed character.
deletingSpeed
number30Milliseconds per deleted character.
pause
number1400Milliseconds to rest on a finished phrase before deleting.
loop
boolean—Loop back to the first phrase after the last. Defaults to `true` when more than one phrase is provided.
reducedMotion
TypingTextMotionPreference"respect"How `prefers-reduced-motion` is honoured. Defaults to `"respect"` (show the current phrase in full). `"always"` forces the typewriter; `"never"` always shows the first phrase statically.
className
string—Additional class names merged onto the root.
id
string—DOM id of the root element.