Skip to content

Commit

Permalink
import typewriter animation and button animation to home
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohitha-pudu committed Jun 2, 2024
1 parent 0bc27fa commit 09b4d6e
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 5 deletions.
31 changes: 31 additions & 0 deletions frontend/src/components/HeroText.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
"use client";

import { TypewriterEffectSmooth } from "./ui/TypeWriter";

export function TypewriterEffectSmoothDemo() {
const words = [
{
text: "Welcome",
className:"text-5xl text-white"
},
{
text: "To",
className:"text-5xl text-white"
},
{
text: "Style",
className: "text-blue-500 text-5xl",
},
{
text: "Share",
className: "text-blue-500 text-5xl",
},

];
return (
<div className=" mx-autofont-bold mb-4">
<TypewriterEffectSmooth words={words} />
</div>

);
}
17 changes: 12 additions & 5 deletions frontend/src/pages/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
import { Link } from "react-router-dom";
import { TypewriterEffectSmoothDemo } from "../components/HeroText";
import MagicButton from "../components/ui/MagicButton";

function Home() {
return (
<div className="max-w-screen-xl mx-auto px-4 py-8 text-white">
<div className="grid grid-cols-1 md:grid-cols-2 gap-8 items-center justify-center">
<div>
<h1 className="text-6xl font-bold mb-4">Welcome to Style Share</h1>
<p className="text-xl mb-6">
<h1 className="text-6xl font-bold mb-4">
{/* Welcome to Style Share */}
<TypewriterEffectSmoothDemo/>
</h1>
<p className="text-[1.3rem] mb-6 text-gray-300">
A simple web based platform where users can easily create, explore,
and share Tailwind CSS components and designs with fellow users.
</p>
<button className="bg-blue-700 text-white py-2 px-4 rounded-md hover:bg-blue-600">
<Link to="/app/posts">Explore</Link>
</button>
<div className=" text-white py-2 rounded-md">
<Link to="/app/posts">
<MagicButton title="Explore" ></MagicButton>
</Link>
</div>
</div>
{/* <div className="h-58 w-45 bg-red"></div> */}
<div className="hidden md:block">
Expand Down

0 comments on commit 09b4d6e

Please sign in to comment.