@@ -4,7 +4,6 @@ import { motion } from 'framer-motion'
44import { useState , useEffect } from 'react'
55
66import { HeroButtons } from './hero-buttons'
7- import { Section } from './section'
87
98// Typing effect component for hero headline
109function TypingEffect ( { words } : { words : string [ ] } ) {
@@ -60,63 +59,92 @@ function TypingEffect({ words }: { words: string[] }) {
6059
6160export function Hero ( ) {
6261 return (
63- < Section hero >
64- < div className = "relative z-10" >
65- < motion . div
66- initial = { { opacity : 0 , y : 30 } }
67- animate = { { opacity : 1 , y : 0 } }
68- transition = { { duration : 0.7 } }
62+ < div className = "relative z-10" >
63+ < motion . div
64+ initial = { { opacity : 0 , y : 30 } }
65+ animate = { { opacity : 1 , y : 0 } }
66+ transition = { { duration : 0.7 } }
67+ >
68+ < motion . h1
69+ className = "hero-heading text-center mb-8 text-white text-balance"
70+ variants = { {
71+ animate : {
72+ transition : {
73+ staggerChildren : 0.2 ,
74+ } ,
75+ } ,
76+ } }
77+ initial = "initial"
78+ animate = "animate"
6979 >
70- < motion . h1
71- className = "hero-heading text-center mb-8 text-white text-balance"
72- initial = { { opacity : 0 , scale : 0.95 } }
73- animate = { { opacity : 1 , scale : 1 } }
74- transition = { {
75- duration : 0.8 ,
76- ease : [ 0.165 , 0.84 , 0.44 , 1 ] ,
80+ < motion . span
81+ variants = { {
82+ initial : { opacity : 0 , y : 20 } ,
83+ animate : {
84+ opacity : 1 ,
85+ y : 0 ,
86+ transition : {
87+ duration : 0.8 ,
88+ ease : [ 0.165 , 0.84 , 0.44 , 1 ] ,
89+ } ,
90+ } ,
7791 } }
7892 >
79- < motion . span
80- className = "relative inline-block"
81- initial = { { y : 20 } }
82- animate = { { y : 0 } }
83- transition = { { duration : 0.5 , delay : 0.1 } }
84- >
85- < span className = "relative z-10" > Supercharge</ span >
86- </ motion . span > { ' ' }
87- Your{ ' ' }
88- < motion . span
89- className = "relative inline-block"
90- initial = { { y : 20 } }
91- animate = { { y : 0 } }
92- transition = { { duration : 0.5 , delay : 0.2 } }
93- >
94- < span className = "relative z-10" > AI Coding</ span >
95- </ motion . span >
96- </ motion . h1 >
97- </ motion . div >
93+ Supercharge
94+ </ motion . span > { ' ' }
95+ < motion . span
96+ variants = { {
97+ initial : { opacity : 0 , y : 20 } ,
98+ animate : {
99+ opacity : 1 ,
100+ y : 0 ,
101+ transition : {
102+ duration : 0.8 ,
103+ ease : [ 0.165 , 0.84 , 0.44 , 1 ] ,
104+ } ,
105+ } ,
106+ } }
107+ >
108+ Your AI
109+ </ motion . span > { ' ' }
110+ < motion . span
111+ variants = { {
112+ initial : { opacity : 0 , y : 20 } ,
113+ animate : {
114+ opacity : 1 ,
115+ y : 0 ,
116+ transition : {
117+ duration : 0.8 ,
118+ ease : [ 0.165 , 0.84 , 0.44 , 1 ] ,
119+ } ,
120+ } ,
121+ } }
122+ >
123+ Coding
124+ </ motion . span >
125+ </ motion . h1 >
126+ </ motion . div >
98127
99- < motion . h2
100- className = "hero-subtext text-center mx-auto max-w-xl mb-6"
101- initial = { { opacity : 0 , y : 20 } }
102- animate = { { opacity : 1 , y : 0 } }
103- transition = { { duration : 0.5 , delay : 0.3 } }
104- >
105- < span className = "whitespace-nowrap" > Simple. Fast. Powerful.</ span > { ' ' }
106- < span className = "whitespace-nowrap" >
107- Codebuff works in your terminal.
108- </ span >
109- </ motion . h2 >
128+ < motion . h2
129+ className = "hero-subtext text-center mx-auto max-w-xl mb-6"
130+ initial = { { opacity : 0 , y : 20 } }
131+ animate = { { opacity : 1 , y : 0 } }
132+ transition = { { duration : 0.5 , delay : 0.3 } }
133+ >
134+ < span className = "whitespace-nowrap" > Simple. Fast. Powerful.</ span > { ' ' }
135+ < span className = "whitespace-nowrap" >
136+ Codebuff works in your terminal.
137+ </ span >
138+ </ motion . h2 >
110139
111- < motion . div
112- initial = { { opacity : 0 , y : 20 } }
113- animate = { { opacity : 1 , y : 0 } }
114- transition = { { duration : 0.5 , delay : 0.5 } }
115- className = "mb-12 md:mb-4" // Added more bottom margin on mobile
116- >
117- < HeroButtons />
118- </ motion . div >
119- </ div >
120- </ Section >
140+ < motion . div
141+ initial = { { opacity : 0 , y : 20 } }
142+ animate = { { opacity : 1 , y : 0 } }
143+ transition = { { duration : 0.5 , delay : 0.5 } }
144+ className = "mb-12 md:mb-4" // Added more bottom margin on mobile
145+ >
146+ < HeroButtons />
147+ </ motion . div >
148+ </ div >
121149 )
122150}
0 commit comments