Human-Like
Usage

Configuration

Fine‑tune typing behavior

Pass config to adjust timing, behavior, and mistakes.

<HumanLike text="Configured" config={{ speed: 60, mistakeFrequency: 0.05 }} />

Options

OptionTypeDefaultDescription
speednumber80Base ms per char
speedVariationnumber30Random ±ms
keyboardMode'mobile' | 'desktop''mobile'Platform behavior
mistakeFrequencynumber0.03Error probability
mistakeTypes{ adjacent, random, doubleChar, commonTypos }see belowEnabled mistake kinds
fatigueEffectbooleanfalseGradual slowdown
concentrationLapsesbooleanfalseThinking pauses
overcorrectionbooleanfalseErrors while correcting
sentencePausenumber500Pause after . ! ?
wordPausenumber150Pause between words
thinkingPausenumber400Pause before complex words
minCharDelaynumber30Minimum delay
backspaceSpeednumber60Correction speed
realizationDelaynumber300Time to notice mistake
correctionPausenumber250Pause before retyping
debugbooleanfalseConsole logging

Patterns

Core Timing

Control the base typing speed and natural variation.

<HumanLike 
  text="Adjust typing speed and variation for natural rhythm" 
  config={{ 
    speed: 40,           // Slower base speed
    speedVariation: 20,  // ±20ms random variation
    minCharDelay: 30     // Minimum delay between chars
  }} 
/>

Mistake Configuration

Fine-tune error frequency and types for realistic typing.

<HumanLike 
  text="Configure realistic typing mistakes and corrections" 
  config={{ 
    mistakeFrequency: 0.05,  // 5% chance of mistakes
    mistakeTypes: {
      adjacent: true,        // Hit nearby keys
      doubleChar: true,      // Double characters
      commonTypos: true,     // Real typos (teh -> the)
      random: false          // Disable random errors
    },
    realizationDelay: 400,   // Time to notice mistake
    backspaceSpeed: 60,      // Correction speed
    correctionPause: 300     // Pause before retyping
  }} 
/>

Human Behavior

Add realistic human behaviors like fatigue and concentration lapses.

<HumanLike 
  text="Simulate realistic human typing patterns and behaviors" 
  config={{ 
    fatigueEffect: true,        // Gradual slowdown over time
    concentrationLapses: true,  // Random thinking pauses
    overcorrection: true,       // Errors while correcting mistakes
    thinkingPause: 500         // Pause before complex words
  }} 
/>

Advanced Timing

Control pauses between different text elements.

<HumanLike 
  text="Advanced timing. Controls pauses between sentences, words, and corrections!" 
  config={{ 
    sentencePause: 600,    // Pause after . ! ?
    wordPause: 180,        // Pause between words
    thinkingPause: 500,    // Pause before complex words
    backspaceSpeed: 40,    // Slower corrections
    realizationDelay: 400, // Delay noticing mistakes
    correctionPause: 300   // Pause before retyping
  }} 
/>

Platform-Specific

Different behaviors for mobile vs desktop typing.

// Mobile typing (default)
<HumanLike 
  text="Mobile: @hello 123" 
  config={{ 
    keyboardMode: 'mobile',
    speed: 90,              // Slightly slower on mobile
    mistakeFrequency: 0.04  // More mistakes on mobile
  }} 
/>

// Desktop typing
<HumanLike 
  text="Desktop: @Hello 123" 
  config={{ 
    keyboardMode: 'desktop',
    speed: 70,              // Faster on desktop
    mistakeFrequency: 0.02  // Fewer mistakes on desktop
  }} 
/>

Debug Mode

Enable detailed logging to understand typing behavior.

<HumanLike 
  text="Debug mode shows detailed typing information in console" 
  config={{ 
    debug: true,           // Enable console logging
    speed: 60,
    mistakeFrequency: 0.05
  }} 
/>