GraphTypewriter

Import

svelte
import { GraphTypewriter } from 'markgraphy';

Basic usage

svelte
<GraphTypewriter
  title="example"
  speedMs={55}
/>

Props

PropTypeDefaultDescription
titlestringCaption drawn on the top edge as [ TITLE ]. Uppercase, 1–2 words.
linesstring[]Lines typed one character at a time, in order.
speedMs?number55Milliseconds per character. Default 55.
holdMs?number1400Milliseconds to hold the full text before restarting. Default 1400.
loop?booleantrueClear and retype after the hold. Default true.
cursor?string'█'Cursor character shown after the last revealed character. Default ’█‘.
animated?booleantrueAnimate the typing. Default true. Reduced motion shows the full text.
corner?stringCharacter at each corner of the frame. Default ’+‘.
class?string''

Exported types

  • GraphTypewriterProps

Reduced motion

Animation is disabled under prefers-reduced-motion.