0.1.1 • Published 5 years ago

sentences-typing v0.1.1

Weekly downloads
11
License
-
Repository
github
Last release
5 years ago

Sentences typing

Sentences typing is a small react component that types sentence after sentence.

Demo

Install

npm install sentences-typing --save

or

yarn add sentences-typing

Basic Usage

import React, {Component} from 'react';
import { Typing } from 'sentences-typing';

const sentences = [
    'Lorem ipsum dolor sit amet',
    'consectetur adipiscing elit',
    'sed do eiusmod tempor incididunt'
];

export default class MyComponent extends Component {
  render() {
    return (
      <Typing sentences={sentences}/>
    );
  }
}

Infinity mode

import React, {Component} from 'react';
import { Typing } from 'sentences-typing';

const sentences = [
    'Lorem ipsum dolor sit amet',
    'consectetur adipiscing elit',
    'sed do eiusmod tempor incididunt'
];

export default class MyComponent extends Component {
  render() {
    return (
      <Typing sentences={sentences} infinity/>
    );
  }
}

Props

sentences

Array of strings for typing.

infinity

Default: false

When infinity mode is active component typing sentences in infinity loop (starting from the second sentence)