@kndev/animate-writer
v0.0.3
Published
<h1 align="center">AnimateWriter</h1>
Readme
Install
npm i @kndev/animate-writer -DUsage
- Create element to select.
<p class="some-class"></span>
- Usage in your js file
import { animateWriter } from '@kndev/animate-writer';
import "@kndev/animate-writer/dist/style.css";
animateWriter(document.querySelector('.some-class'));
// or with options
animateWriter(document.querySelector('.some-class'), { delay: 350 });Options
There are a number of options you may use to customize typeIt.
interface AnimateWriterOptions {
/**
* Write speed
* @default 200
*/
speed: number;
/**
* String to be write
* @default HTMLElement.textContent | 'Default string'
*/
input: string;
/**
* Simulation of human input
* @default true
*/
isAutoSpeedChange: boolean;
/**
* Blinking cursor at the end of a line
* @default true
*/
isCursorShow?: boolean;
}