Skip to content

Keyboard

Kevin Gonzalez edited this page Sep 13, 2019 · 2 revisions

Using the Keyboard component

  • Import Keyboard from react-mk

  • Keyboard accepts any child with a valid toString method

  • Keyboard exposes a type method when children is a type of function

  • Keyboard will type out your text in an organic manner, see example

  • Besides children, Keyboard can take the following optional props

    • sentenceDelayPerCharRange: an array of two numbers indicating the delay in milliseconds which react-mk applies between words, the delay is calculated by getting a random number in your range and multiplying it by the number of characters in your sentence.
    • keyPressDelayRange: an array of two numbers indicating the delay in milliseconds which react-mk applies between characters, the delay is calculated by getting a random number in your range.

Example

See example.

Clone this wiki locally