Skip to content

Commit

Permalink
Merge pull request #62 from akash70629/animation
Browse files Browse the repository at this point in the history
Feat:Animated Tagline
  • Loading branch information
vansh-codes authored Oct 29, 2024
2 parents b9f2aff + 603d4aa commit 2e53c9c
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 10 deletions.
20 changes: 19 additions & 1 deletion components/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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("");
Expand Down Expand Up @@ -55,7 +56,24 @@ function Home() {
{/* Main Content */}
<main className="flex flex-col justify-center items-center flex-grow px-8 sm:px-4">
<h1 className="text-4xl font-light text-transparent bg-clip-text bg-gradient-to-r from-purple-400 to-pink-600 tracking-widest mb-8">
Let's, Begin...
<Typewriter
options={{
cursor: "<span style='color: #fff; animation: blink 1s infinite;'>|</span>",
}}
onInit={(typewriter) => {
const animate = () => {
typewriter
.typeString("Let's, Begin...")
.pauseFor(1000)
.deleteAll()
.pauseFor(1000)
.start();
setTimeout(animate, 2000); // Adjust delay
};
animate();
}}
/>

</h1>
<form className="flex items-center w-full sm:w-2/3 lg:w-1/3 h-1/3" onSubmit={handleSubmit}>
<div className="flex items-center bg-white rounded-full shadow-md p-2 w-full">
Expand Down
36 changes: 30 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -26,4 +27,4 @@
"postcss": "^8",
"tailwindcss": "^3.4.1"
}
}
}

0 comments on commit 2e53c9c

Please sign in to comment.