{"id":13630576,"url":"https://github.com/notadamking/react-typing-animation","last_synced_at":"2025-04-07T09:19:09.276Z","repository":{"id":39908023,"uuid":"90240359","full_name":"notadamking/react-typing-animation","owner":"notadamking","description":"A fully-featured typing animation in React that supports any valid JSX.","archived":false,"fork":false,"pushed_at":"2023-03-01T18:07:04.000Z","size":18304,"stargazers_count":266,"open_issues_count":32,"forks_count":42,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-31T07:07:03.776Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://adamjking3.github.io/react-typing-animation-example/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/notadamking.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-05-04T08:35:18.000Z","updated_at":"2024-11-04T13:17:08.000Z","dependencies_parsed_at":"2024-01-14T09:00:18.815Z","dependency_job_id":null,"html_url":"https://github.com/notadamking/react-typing-animation","commit_stats":null,"previous_names":["adamjking3/react-typing-animation"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notadamking%2Freact-typing-animation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notadamking%2Freact-typing-animation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notadamking%2Freact-typing-animation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notadamking%2Freact-typing-animation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/notadamking","download_url":"https://codeload.github.com/notadamking/react-typing-animation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247557764,"owners_count":20958047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T22:01:47.765Z","updated_at":"2025-04-07T09:19:09.246Z","avatar_url":"https://github.com/notadamking.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","📦 Legacy \u0026 Inactive Projects"],"sub_categories":[],"readme":"# React-typing-animation\n\n[![npm version](https://img.shields.io/npm/v/react-typing-animation.svg)](https://npm.im/react-typing-animation) ![Licence](https://img.shields.io/npm/l/react-typing-animation.svg)\n\n\u003e A fully-featured typing animation in React that supports any valid JSX.\n\n\u003cp align=\"center\"\u003e\u003cimg src =\"https://github.com/adamjking3/react-typing-animation/blob/master/typing.gif\" /\u003e\u003c/p\u003e\n\n## Motivation\n\nThere were other JS typing animations that existed when I created this, but they were all lacking in robust features. This component aims to support all of the following features:\n\n✅ Type text from any valid JSX\n\n✅ Preserve DOM structure/styling\n\n✅ Change typing speed anywhere in tree\n\n✅ Add a delay anywhere in tree\n\n✅ Backspace animation\n\n✅ Reset lines / full tree\n\n✅ Loop functionality\n\n✅ No dependencies (CSS or JS)\n\n## Demo\n\nView the [live demo](https://adamjking3.github.io/react-typing-animation-example/)\n\n**or**\n\n```shell\ngit clone https://github.com/adamjking3/react-typing-animation\ncd react-typing-animation\nnpm install\nnpm start\n```\n\nThen open http://localhost:3000/ in a browser.\n\n**Feature requests and pull requests welcome**\n\n## Installation\n\n```shell\nnpm i --save react-typing-animation\n```\n\n## Usage\n\n```jsx\nimport Typing from 'react-typing-animation';\n\nconst AnimatedTypingComponent = () =\u003e (\n  \u003cTyping\u003e\n    \u003cspan\u003eThis span will get typed.\u003c/span\u003e\n  \u003c/Typing\u003e\n);\n```\n\n## Documentation\n\n|     Property     |    Type    |                                            Default                                             | Required |\n| :--------------: | :--------: | :--------------------------------------------------------------------------------------------: | :------: |\n|     element     | string |   div                                                                                             |   no    |\n|     children     | React node |                                                                                                |   yes    |\n|    className     |   string   |                                                                                                |    no    |\n|    cursorClassName     |   string   |                                                                                                |    no    |\n|     cursorElement     | string |   span                                                                                             |   no    |\n|      cursor      | React node | [`\u003cCursor /\u003e`](https://github.com/adamjking3/react-typing-animation/blob/master/src/Cursor.js) |    no    |\n|      hideCursor      |  boolean   |                                             false                                              |    no    |\n|      speed       |   number   |                                            50 (ms)                                             |    no    |\n|    startDelay    |   number   |                                             0 (ms)                                             |    no    |\n|       loop       |  boolean   |                                             false                                              |    no    |\n| onStartedTyping |  function  |                                            () =\u003e {}                                            |    no    |\n| onBeforeType |  function  |                                            () =\u003e {}                                            |    no    |\n| onAfterType |  function  |                                            () =\u003e {}                                            |    no    |\n| onFinishedTyping |  function  |                                            () =\u003e {}                                            |    no    |\n\n*Note: if `cursorElement` is set as an empty string, a React.Fragment element will be used to wrap children.*\n\n### Backspace Component\n\n```jsx\nimport Typing from 'react-typing-animation';\n...\n  \u003cTyping\u003e\n    \u003cspan\u003eThis span will get typed, then erased.\u003c/span\u003e\n    \u003cTyping.Backspace count={20} /\u003e\n  \u003c/Typing\u003e\n```\n\n| Property |  Type  | Default | Required | Description |\n| :------: | :----: | :-----: | :------: | :---------: |\n|  count   | number |    1    |  false   |             |\n|  delay   | number |    0    |  false   |             |\n|  speed   | number |   -1    |  false   |             |\n\n### Delay Component\n\n```jsx\nimport Typing from 'react-typing-animation';\n...\n  \u003cTyping\u003e\n    \u003cdiv\u003e\n      There will be a 1000ms delay here,\n      \u003cTyping.Delay ms={1000} /\u003e\n      then this will be typed.\n    \u003c/div\u003e\n  \u003c/Typing\u003e\n```\n\n| Property |  Type  | Default | Required | Description |\n| :------: | :----: | :-----: | :------: | :---------: |\n|    ms    | number |         |   yes    |             |\n\n### Speed Component\n\n```jsx\nimport Typing from 'react-typing-animation';\n...\n  \u003cTyping speed={50}\u003e\n    This line will be typed at 50ms/character,\n    \u003cTyping.Speed ms={200} /\u003e\n    then this will be typed at 200ms/character.\n  \u003c/Typing\u003e\n```\n\n| Property |  Type  | Default | Required | Description |\n| :------: | :----: | :-----: | :------: | :---------: |\n|    ms    | number |         |   yes    |             |\n\n### Reset Component\n\n```jsx\nimport Typing from 'react-typing-animation';\n...\n  \u003cTyping\u003e\n    \u003cspan\u003eThis line will stay.\u003c/span\u003e\n    \u003cspan\u003eThis line will get instantly removed after a 500 ms delay\u003c/span\u003e\n    \u003cTyping.Reset count={1} delay={500} /\u003e\n  \u003c/Typing\u003e\n```\n\n| Property |  Type  | Default | Required | Description |\n| :------: | :----: | :-----: | :------: | :---------: |\n|  count   | number |    0    |  false   |             |\n|  delay   | number |    0    |  false   |             |\n|  speed   | number |   -1    |  false   |             |\n\n## Contributing\n\nAfter cloning the repository and running npm install inside, you can use the following commands to develop and build the project.\n\n```shell\n# Starts a webpack dev server that hosts the demo at http://localhost:3000\nnpm start\n\n# Lints the code with eslint\nnpm run lint\n\n# Lints and builds the code, placing the result in the dist directory.\nnpm run build\n```\n\nPull requests are welcome!\n\n## License\n\n[MIT](https://github.com/adamjking3/react-typing-animation/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotadamking%2Freact-typing-animation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnotadamking%2Freact-typing-animation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotadamking%2Freact-typing-animation/lists"}