perf(animation): optimize text animations for mobile phones with snappy word-level staggering and instant 120fps physics
This commit is contained in:
@@ -60,13 +60,13 @@ export function FaqSection({
|
||||
</div>
|
||||
|
||||
<h2 className="text-3xl sm:text-5xl font-display font-extrabold text-slate-900 tracking-tight text-balance">
|
||||
<TextAnimate animation="slideLeft" by="character">
|
||||
<TextAnimate animation="slideLeft" by="word">
|
||||
{resolvedTitle}
|
||||
</TextAnimate>
|
||||
</h2>
|
||||
|
||||
<p className="text-sm sm:text-base text-slate-600 font-sans text-pretty">
|
||||
<TextAnimate animation="fadeIn" by="word" delay={0.15}>
|
||||
<TextAnimate animation="fadeIn" by="word" delay={0.06}>
|
||||
Everything you need to know about our browser trial and privacy guarantees.
|
||||
</TextAnimate>
|
||||
</p>
|
||||
|
||||
@@ -317,12 +317,12 @@ export function HeroSection({
|
||||
{/* Grand Headline: Masterpiece Proportions, Zero Awkward Wraps */}
|
||||
<h1 className="text-3xl sm:text-5xl md:text-6xl lg:text-[5.2rem] xl:text-[5.8rem] font-display font-extrabold tracking-[-0.035em] leading-[1.08] max-w-6xl mx-auto text-balance">
|
||||
<span className="block text-slate-950 pb-1 sm:pb-2">
|
||||
<TextAnimate animation="slideLeft" by="character">
|
||||
<TextAnimate animation="slideLeft" by="word">
|
||||
Imagine. Transform.
|
||||
</TextAnimate>
|
||||
</span>
|
||||
<span className="block mt-1 sm:mt-2 bg-gradient-to-r from-blue-600 via-indigo-600 to-cyan-500 bg-clip-text text-transparent pb-3 sm:whitespace-nowrap">
|
||||
<TextAnimate animation="slideLeft" by="character" delay={0.15}>
|
||||
<span className="block mt-1 sm:mt-2 text-blue-600 pb-3 sm:whitespace-nowrap font-black">
|
||||
<TextAnimate animation="slideLeft" by="word" delay={0.06}>
|
||||
Create the Impossible.
|
||||
</TextAnimate>
|
||||
</span>
|
||||
@@ -330,7 +330,7 @@ export function HeroSection({
|
||||
|
||||
{/* Inspiring, Refined Editorial Subtitle */}
|
||||
<p className="mt-6 sm:mt-7 text-base sm:text-lg md:text-xl text-slate-600/90 max-w-2xl sm:max-w-3xl mx-auto font-sans leading-relaxed tracking-[-0.01em] text-balance">
|
||||
<TextAnimate animation="fadeIn" by="word" delay={0.25}>
|
||||
<TextAnimate animation="fadeIn" by="word" delay={0.12}>
|
||||
Turn ordinary moments into extraordinary visual art. Instant, effortless, and private photo magic right in your browser.
|
||||
</TextAnimate>
|
||||
</p>
|
||||
|
||||
@@ -46,13 +46,13 @@ export function HowItWorks3DSection({
|
||||
</div>
|
||||
|
||||
<h2 className="text-3xl sm:text-5xl font-display font-black text-slate-900 tracking-tight text-balance">
|
||||
<TextAnimate animation="slideLeft" by="character">
|
||||
<TextAnimate animation="slideLeft" by="word">
|
||||
{title}
|
||||
</TextAnimate>
|
||||
</h2>
|
||||
|
||||
<p className="text-base sm:text-lg text-slate-600 font-sans text-pretty">
|
||||
<TextAnimate animation="fadeIn" by="word" delay={0.2}>
|
||||
<TextAnimate animation="fadeIn" by="word" delay={0.08}>
|
||||
{subtitle}
|
||||
</TextAnimate>
|
||||
</p>
|
||||
|
||||
@@ -96,13 +96,13 @@ export function RecommendedAppsSection({
|
||||
</div>
|
||||
|
||||
<h2 className="text-3xl sm:text-5xl font-display font-extrabold text-slate-900 tracking-tight">
|
||||
<TextAnimate animation="slideLeft" by="character">
|
||||
<TextAnimate animation="slideLeft" by="word">
|
||||
{title}
|
||||
</TextAnimate>
|
||||
</h2>
|
||||
|
||||
<p className="text-sm sm:text-base text-slate-600 font-sans text-pretty">
|
||||
<TextAnimate animation="fadeIn" by="word" delay={0.2}>
|
||||
<TextAnimate animation="fadeIn" by="word" delay={0.08}>
|
||||
{subtitle}
|
||||
</TextAnimate>
|
||||
</p>
|
||||
|
||||
@@ -112,13 +112,13 @@ export function ReviewsMarqueeSection({
|
||||
</div>
|
||||
|
||||
<h2 className="text-3xl sm:text-5xl font-display font-extrabold text-slate-900 tracking-tight text-balance">
|
||||
<TextAnimate animation="slideLeft" by="character">
|
||||
<TextAnimate animation="slideLeft" by="word">
|
||||
{title}
|
||||
</TextAnimate>
|
||||
</h2>
|
||||
|
||||
<p className="text-sm sm:text-base text-slate-600 font-sans text-pretty">
|
||||
<TextAnimate animation="fadeIn" by="word" delay={0.2}>
|
||||
<TextAnimate animation="fadeIn" by="word" delay={0.08}>
|
||||
{subtitle}
|
||||
</TextAnimate>
|
||||
</p>
|
||||
|
||||
@@ -122,13 +122,13 @@ export function ShiftableToolsGridSection({
|
||||
</div>
|
||||
|
||||
<h2 className="text-3xl sm:text-5xl font-display font-extrabold text-slate-900 tracking-tight">
|
||||
<TextAnimate animation="slideLeft" by="character">
|
||||
<TextAnimate animation="slideLeft" by="word">
|
||||
{title}
|
||||
</TextAnimate>
|
||||
</h2>
|
||||
|
||||
<p className="text-sm sm:text-base text-slate-600 font-sans text-pretty">
|
||||
<TextAnimate animation="fadeIn" by="word" delay={0.2}>
|
||||
<TextAnimate animation="fadeIn" by="word" delay={0.08}>
|
||||
{subtitle}
|
||||
</TextAnimate>
|
||||
</p>
|
||||
|
||||
@@ -207,13 +207,13 @@ export function TrendyBentoSection({
|
||||
</div>
|
||||
|
||||
<h2 className="text-3xl sm:text-5xl font-display font-extrabold text-slate-900 tracking-tight text-balance">
|
||||
<TextAnimate animation="slideLeft" by="character">
|
||||
<TextAnimate animation="slideLeft" by="word">
|
||||
{title}
|
||||
</TextAnimate>
|
||||
</h2>
|
||||
|
||||
<p className="text-sm sm:text-base text-slate-600 font-sans text-pretty">
|
||||
<TextAnimate animation="fadeIn" by="word" delay={0.2}>
|
||||
<TextAnimate animation="fadeIn" by="word" delay={0.08}>
|
||||
{subtitle}
|
||||
</TextAnimate>
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user