Files
webb/src/components/sections/ReviewsMarqueeSection.tsx
T

203 lines
7.1 KiB
TypeScript
Raw Normal View History

'use client';
import React from 'react';
import { Star, MessageSquareQuote, CheckCircle2 } from 'lucide-react';
import { Marquee } from '@/components/magicui/marquee';
import { TextAnimate } from '@/components/magicui/text-animate';
interface ReviewsMarqueeSectionProps {
title?: string;
badge?: string;
subtitle?: string;
}
const REVIEWS_ROW_1 = [
{
name: 'Elena Rostova',
username: '@elena_studios',
role: 'Editorial Portrait Photographer',
rating: 5,
avatar: 'ER',
body: 'The blemish remover is lightyears ahead of typical automated tools. It removes red spots and acne while keeping real pores and skin texture intact.',
tool: 'Blemish Remover',
},
{
name: 'Marcus Vance',
username: '@vance_commerce',
role: 'Shopify Store Owner',
rating: 5,
avatar: 'MV',
body: 'The P3M cutout matting saved my product photography workflow. Hair strands and glass reflections are perfectly separated in under a second.',
tool: 'Background Remover',
},
{
name: 'David Chen',
username: '@davidchen_art',
role: 'Digital Concept Artist',
rating: 5,
avatar: 'DC',
body: 'Zero-storage privacy was our #1 criteria. Knowing photos aren’t kept on a remote server gave our agency complete peace of mind.',
tool: 'Zero-Storage Policy',
},
{
name: 'Ananya Sharma',
username: '@ananya_design',
role: 'Fashion Creative Director',
rating: 5,
avatar: 'AS',
body: 'Super clean results without signing up for an account. I tried it right on desktop and immediately downloaded the iOS app for batch edits.',
tool: 'Portrait Studio App',
},
];
const REVIEWS_ROW_2 = [
{
name: 'Liam O’Connor',
username: '@liam_restores',
role: 'Historical Archivist',
rating: 5,
avatar: 'LO',
body: 'I restored my grandparents’ 1942 wedding photo. The generative facial super-resolution restored the iris clarity and fine lace details amazingly.',
tool: 'Vintage Restorer',
},
{
name: 'Chloe Dubois',
username: '@chloe_visuals',
role: 'Social Media Creator',
rating: 5,
avatar: 'CD',
body: 'The anime avatar tool is genuinely viral. It doesn’t just blur your face with a cartoon filter, it genuinely reinterprets lineart.',
tool: 'CartoonGAN Studio',
},
{
name: 'Vikram Malhotra',
username: '@vikram_ux',
role: 'Product Lead',
rating: 5,
avatar: 'VM',
body: 'Blazingly fast. No laggy loading screens, instantaneous before/after comparison slider, and crystal clear 4K export quality.',
tool: 'Photo Enhancer 4K',
},
{
name: 'Sophie Tanaka',
username: '@sophie_tanaka',
role: 'Commercial Retoucher',
rating: 5,
avatar: 'ST',
body: 'Teeth whitening without that artificial nuclear neon white look. It subtly brightens enamel while respecting natural gum tones.',
tool: 'Teeth Whitener AI',
},
];
export function ReviewsMarqueeSection({
title = 'Loved by Creators & Professionals',
badge = 'VERIFIED COMMUNITY FEEDBACK',
subtitle = 'Over 1.4 million photos processed with five-star ratings across web and mobile apps.',
}: ReviewsMarqueeSectionProps) {
return (
<section id="user-reviews" className="py-14 sm:py-20 bg-[#FAF8F5] relative overflow-hidden border-t border-slate-900/[0.06]">
{/* Symbolic Elemental Ambient Highlights */}
<div
className="absolute inset-0 pointer-events-none -z-10"
style={{
background: 'radial-gradient(circle at 50% 50%, rgba(245,158,11,0.05) 0%, transparent 60%)',
}}
/>
<div className="max-w-[1640px] mx-auto px-4 sm:px-6 md:px-8 lg:px-10 space-y-10">
{/* Section Header */}
<div className="text-center max-w-3xl mx-auto space-y-4">
<div className="inline-flex items-center gap-2 px-3.5 py-1 rounded-full text-xs font-mono font-semibold tracking-wider uppercase text-blue-700 bg-blue-50 border border-blue-200">
<MessageSquareQuote className="w-3.5 h-3.5 text-blue-600" />
<span>{badge}</span>
</div>
<h2 className="text-3xl sm:text-5xl font-display font-extrabold text-slate-900 tracking-tight text-balance">
<TextAnimate animation="slideLeft" by="character">
{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}>
{subtitle}
</TextAnimate>
</p>
</div>
{/* Marquee Container with Left & Right Gradient Feather Masks */}
<div className="relative flex w-full flex-col items-center justify-center overflow-hidden [mask-image:linear-gradient(to_right,transparent,black_10%,black_90%,transparent)]">
{/* Row 1: Leftward Marquee */}
<Marquee pauseOnHover className="[--duration:35s]">
{REVIEWS_ROW_1.map((review, idx) => (
<ReviewCard key={idx} {...review} />
))}
</Marquee>
{/* Row 2: Rightward Reverse Marquee */}
<Marquee reverse pauseOnHover className="[--duration:40s] mt-4">
{REVIEWS_ROW_2.map((review, idx) => (
<ReviewCard key={idx} {...review} />
))}
</Marquee>
</div>
</div>
</section>
);
}
function ReviewCard({
name,
username,
role,
rating,
avatar,
body,
tool,
}: {
name: string;
username: string;
role: string;
rating: number;
avatar: string;
body: string;
tool: string;
}) {
return (
<figure className="relative w-80 sm:w-96 cursor-pointer overflow-hidden rounded-2xl border border-slate-200/90 bg-white p-5 shadow-cream-sm hover:shadow-cream-md hover:border-blue-300 transition-all duration-300">
<div className="flex items-center justify-between">
<div className="flex items-center gap-3">
<div className="w-10 h-10 rounded-full bg-gradient-to-tr from-blue-600 to-indigo-600 flex items-center justify-center text-white text-xs font-bold tracking-wider shadow-sm">
{avatar}
</div>
<div>
<div className="flex items-center gap-1.5">
<span className="text-sm font-display font-bold text-slate-900">{name}</span>
<CheckCircle2 className="w-3.5 h-3.5 text-blue-600" />
</div>
<p className="text-[11px] text-slate-500">{role}</p>
</div>
</div>
<div className="flex items-center gap-0.5">
{Array(rating)
.fill(0)
.map((_, i) => (
<Star key={i} className="w-3 h-3 fill-amber-400 text-amber-400" />
))}
</div>
</div>
<blockquote className="mt-3.5 text-xs text-slate-600 leading-relaxed font-sans">
“{body}”
</blockquote>
<div className="mt-4 pt-3 border-t border-slate-100 flex items-center justify-between text-[11px] font-mono text-slate-600">
<span className="px-2 py-0.5 rounded bg-blue-50 text-blue-700 font-semibold border border-blue-200/80">
{tool}
</span>
<span className="text-slate-600">{username}</span>
</div>
</figure>
);
}