1.0.2 • Published 5 years ago

bs-typing v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

bs-typing

BuckleScript bindings for the Typed.js library.

Install

First, install dependencies.

yarn add bs-typing typed.js

Lastly, add bs-typing to bsconfig.json.

"bs-dependencies": [ "bs-typing" ]

Usage

index.html

<html>
  <body>
    <span id="typing-example"></span>
    <script src="bundle.js" type="module"></script>
  </body>
</html>

Example.re

let example =
  Typing.make(
    "#typing-example",
    Typing.options(
      ~strings=[|
        {j|Typing animation in ReasonML with the help of Typed.js|j},
      |],
      ~typeSpeed=50,
      ~typeDelay=30,
      ~loop=true,
      ~loopCount=5.0,
      (),
    ),
  );

Take a look at the Example.re file for more examples.

Contribute

Please open an issue or submit a PR if you find something you would like to improve!