Kinetik UI

Typewriter

.md

Text typed out with a human rhythm; several phrases are typed, held, erased and replaced in turn.

v1.0.0Live on web
Component preview

Installation

Kinetik CLI
npx kinetik-ui add typewriter

The CLI copies the source and installs native dependencies with npx expo install, so versions match your Expo SDK. With shadcn: npx shadcn@latest add https://kinetik-ui.dev/r/typewriter.json

Install manually

  1. Copy the source files
    • components/kinetik/typewriter.tsx
    View source files

Usage

import { Typewriter } from '@/components/kinetik/typewriter';

<Typewriter
  prefix="Find your way to "
  phrases={['Huacachina.', 'White Sands.', 'the edge of Fiji.']}
/>;

A single string is typed once and then rests with a blinking caret. Several phrases are typed, held for hold ms, erased and replaced; pass loop={false} to stop on the last one.

When to use

  • Hero headlines that show a range of things in one line: destinations, use cases, audiences.
  • Assistant or terminal-like moments where text arriving is part of the story.

When not to use

  • Anything people must read in full right away: instructions, errors, prices.
  • Long paragraphs. Typing them out only makes people wait; use Word Cascade.

Notes

  • Typing is uneven on purpose, with a beat after spaces and a longer one after punctuation.
  • The caret stays solid while text is moving and blinks only at rest, as in an editor.
  • The line grows as it types; give it room (or a minHeight) so the layout below does not jump.
  • With reduced motion whole phrases swap after each hold.

Props

TypewriterProps

PropTypeDefaultDescription
phrasesrequiredstring | readonly string[]—One phrase, or several typed in turn.
prefixstring—Fixed text before the typed part, e.g. "Find your way to ".
speednumber55Average time per character while typing, in ms. Defaults to 55.
eraseSpeednumber26Time per character while erasing, in ms. Defaults to 26.
holdnumber1800How long a finished phrase stays before it is erased, in ms. Defaults to 1800.
loopbooleantrueGo back to the first phrase after the last. Defaults to true.
caret'bar' | 'block' | 'underscore' | 'none''bar'Caret shape. Defaults to `bar`.
caretColorstring—Caret colour. Defaults to the theme azure.
onPhraseTyped(index: number) => void—Called with a phrase's index once it is fully typed.
styleStyleProp<TextStyle>—
prefixStyleStyleProp<TextStyle>—Style of the prefix, on top of `style`.
containerStyleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
One timeout per character and a slow caret blink at rest. Plain text, so it wraps and scales like any other.
Measured

Pixel 9 emulator, API 35, release build · interaction median 0.85× the system Settings app on the same emulator (indicative only) · keeps drawing at rest · 158 MB app memory. Draws while it types, by design. Janky frames come from redrawing the demo card's full-size photo behind each new letter; frame times stay at p50 17 ms, p99 25 ms.

Real-device measurement pending.

Accessibility

Reduced motion
Whole phrases appear and swap after each hold; the caret still blinks at rest.
Screen readers
Reads as text with the whole current phrase, never a half-typed one.
Touch target
Not interactive.

Source files

components/kinetik/typewriter.tsx is in the Code tab of the preview above.