xxxxxxxxxx
import React from 'react'
import { Typewriter } from 'react-simple-typewriter'
const MyComponent = () => {
return (
<div className='App'>
<Typewriter {/* Props */} />
</div>
)
}
xxxxxxxxxx
//Install Typewriter
npm i react-simple-typewriter
//Import
import { Typewriter, useTypewriter, Cursor } from 'react-simple-typewriter'
/*
Full Documentation Here
\/ */
xxxxxxxxxx
import React from 'react';
//importing typewriter-effect
import Typewriter from "typewriter-effect";
import './App.css';
function App() {
return (
<div className="App">
<Typewriter
onInit={(typewriter) => {
typewriter
.typeString("GeeksForGeeks")
.pauseFor(1000)
.deleteAll()
.typeString("Welcomes You")
.start();
}}
/>
</div>
);
}
export default App;
xxxxxxxxxx
import Typewriter from 'typewriter-effect/dist/core';
new Typewriter('#typewriter', {
strings: ['Hello', 'World'],
autoStart: true,
});