diff --git a/components/Home.jsx b/components/Home.jsx index 7a82d21..94bd22c 100644 --- a/components/Home.jsx +++ b/components/Home.jsx @@ -2,6 +2,7 @@ import { useState } from "react"; import { useRouter } from "next/navigation"; import toast, { Toaster } from 'react-hot-toast'; +import Typewriter from "typewriter-effect"; function Home() { const [username, setUsername] = useState(""); @@ -55,7 +56,24 @@ function Home() { {/* Main Content */}

- Let's, Begin... + |", + }} + onInit={(typewriter) => { + const animate = () => { + typewriter + .typeString("Let's, Begin...") + .pauseFor(1000) + .deleteAll() + .pauseFor(1000) + .start(); + setTimeout(animate, 2000); // Adjust delay + }; + animate(); + }} + /> +

diff --git a/package-lock.json b/package-lock.json index 8582ac4..7562698 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,12 +10,13 @@ "dependencies": { "@google/generative-ai": "^0.21.0", "axios": "^1.7.7", - "next": "14.2.13", + "next": "^14.2.13", "next-themes": "^0.3.0", "react": "^18.3.1", "react-dom": "^18", "react-hot-toast": "^2.4.1", - "react-icons": "^5.3.0" + "react-icons": "^5.3.0", + "typewriter-effect": "^2.21.0" }, "devDependencies": { "@types/react": "^18.3.11", @@ -3417,7 +3418,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -3666,6 +3666,11 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" + }, "node_modules/picocolors": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", @@ -3878,7 +3883,6 @@ "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -3919,6 +3923,14 @@ } ] }, + "node_modules/raf": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz", + "integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==", + "dependencies": { + "performance-now": "^2.1.0" + } + }, "node_modules/react": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", @@ -3970,8 +3982,7 @@ "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "node_modules/read-cache": { "version": "1.0.0", @@ -4809,6 +4820,19 @@ "node": ">=14.17" } }, + "node_modules/typewriter-effect": { + "version": "2.21.0", + "resolved": "https://registry.npmjs.org/typewriter-effect/-/typewriter-effect-2.21.0.tgz", + "integrity": "sha512-Y3VL1fuJpUBj0gS4OTXBLzy1gnYTYaBuVuuO99tGNyTkkub5CXi+b/hsV7Og9fp6HlhogOwWJwgq7iXI5sQlEg==", + "dependencies": { + "prop-types": "^15.8.1", + "raf": "^3.4.1" + }, + "peerDependencies": { + "react": "^17.x || ^18.x", + "react-dom": "^17.x || ^18.x" + } + }, "node_modules/unbox-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", diff --git a/package.json b/package.json index 80acf58..64e7d1d 100644 --- a/package.json +++ b/package.json @@ -11,12 +11,13 @@ "dependencies": { "@google/generative-ai": "^0.21.0", "axios": "^1.7.7", - "next": "14.2.13", + "next": "^14.2.13", "next-themes": "^0.3.0", "react": "^18.3.1", "react-dom": "^18", "react-hot-toast": "^2.4.1", - "react-icons": "^5.3.0" + "react-icons": "^5.3.0", + "typewriter-effect": "^2.21.0" }, "devDependencies": { "@types/react": "^18.3.11", @@ -26,4 +27,4 @@ "postcss": "^8", "tailwindcss": "^3.4.1" } -} \ No newline at end of file +}