# react-type

> The simplest customizable typewriter component built with React.

Latest version **0.1.0** (published 2017-07-15) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install react-type
pnpm add react-type
yarn add react-type
bun add react-type
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2017-07-15 |
| First published | 2017-07-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Oliver Oxenham |
| Maintainers | oliverox |
| Keywords | react, component, typewrite, typing, react-type |

## Links

- npm: https://www.npmjs.com/package/react-type
- Repository: https://github.com/oliverox/react-type
- Issues: https://github.com/oliverox/react-type/issues
- npm.io page: https://npm.io/package/react-type

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2017-07-15

## README

![react-type](https://raw.githubusercontent.com/oliverox/react-type/master/public/logo.png)<br/>
-----
The simplest customizable typewriter component built with React.<br/>**3KB gziped** (including styling).

### Features
✔️ Supports infinitely nested JSX elements.<br/>
✔️ Preserves formatting on child elements.<br/>
✔️ Allows custom typing and erasing speeds.<br/>
✔️ Cycles easily through a list of elements.<br/>
✔️ Gives full control on styling with CSS.<br/>
✔️ Allows custom cursor.<br/>

### Demo

--_GIF image demo here_--

### Installation

```bash
npm install react-type
```

### Usage
```javascript
import Type from 'react-type';

<Type>The earth is but one country, and mankind its citizens.</Type>
```

### API
| Props | Type| Description |
| --- | --- | --- |
| className | String | Applies a class style to the element. |
| cycle | Boolean | Cycle through a list of child elements.<br/>Default: `false` |
| cycleType | String | `erase`: erases previous element before typing the next element.<br/>`reset`: resets cursor to start position before typing the next element.<br/>Default: `erase` |
| defaultElement | String or Element | The default element to start cycling animation with.<br/>Default: `''` |
| eraseDelay | Number| Delay (in ms) before starting to erase characters when cycling.<br/>Default: `2000` |
| onTypingDone | Function | Callback when typing animation is over. |
| pause | Boolean | Controls the start of typing animation.<br/>Default: `false` |
| startTypingDelay | Number | Delay (in ms) before start of typing.<br/>Default: `0` |
| typingDelay | Number | Delay (in ms) before each character typed.<br/>Default: `30` |
| hideCursorDelay | Number | Delay (in ms) before hiding the cursor at the end of the typing animation. A negative value will prevent the cursor from hiding.<br/>Default: `-1` |
| cursorColor | String | The color of the cursor.<br/>Default: `#000` |
| cursorWidth | Number | The width of the cursor in px.<br/>Default: `2` |

---
_Source: https://npm.io/package/react-type · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
