A React component that animates text to make it appear as if it's being written by ChatGPT.
npm install write-like-chat-gpt
.import WriteLikeChatGPT from 'write-like-chat-gpt'
.<WriteLikeChatGPT text="Hello, world!" />
text
: the text to animate (required)import React from 'react';
import WriteLikeChatGPT from 'write-like-chat-gpt';
const MyComponent = () => {
return (
<div>
<WriteLikeChatGPT text="Hello, world!" />
</div>
);
};
export default MyComponent;
This component uses the following React hooks:
useState
useEffect
useMemo
useLayoutEffect
useRef
It also uses the requestAnimationFrame
function to animate the text.
Author: ymlihaa
Source Code: https://github.com/ymlihaa/write-like-chat-gpt
License: ISC