import { Avatar, AvatarFallback, AvatarImage } from '@/registry/default/ui/avatar';
import { Card, CardContent } from '@/registry/default/ui/card';
import { Marquee } from '@/registry/default/ui/marquee';
// Unique reviews data
const testimonials = [
{
name: 'Ava Green',
username: '@ava',
body: 'Cascade AI made my workflow 10x faster!',
img: 'https://randomuser.me/api/portraits/women/32.jpg',
country: '๐ฆ๐บ Australia',
},
{
name: 'Ana Miller',
username: '@ana',
body: 'Vertical marquee is a game changer!',
img: 'https://randomuser.me/api/portraits/women/68.jpg',
country: '๐ฉ๐ช Germany',
},
{
name: 'Mateo Rossi',
username: '@mat',
body: 'Animations are buttery smooth!',
img: 'https://randomuser.me/api/portraits/men/51.jpg',
country: '๐ฎ๐น Italy',
},
{
name: 'Maya Patel',
username: '@maya',
body: 'Setup was a breeze!',
img: 'https://randomuser.me/api/portraits/women/53.jpg',
country: '๐ฎ๐ณ India',
},
{
name: 'Noah Smith',
username: '@noah',
body: 'Best marquee component!',
img: 'https://randomuser.me/api/portraits/men/33.jpg',
country: '๐บ๐ธ USA',
},
{
name: 'Lucas Stone',
username: '@luc',
body: 'Very customizable and smooth.',
img: 'https://randomuser.me/api/portraits/men/22.jpg',
country: '๐ซ๐ท France',
},
{
name: 'Haruto Sato',
username: '@haru',
body: 'Impressive performance on mobile!',
img: 'https://randomuser.me/api/portraits/men/85.jpg',
country: '๐ฏ๐ต Japan',
},
{
name: 'Emma Lee',
username: '@emma',
body: 'Love the pause on hover feature!',
img: 'https://randomuser.me/api/portraits/women/45.jpg',
country: '๐จ๐ฆ Canada',
},
{
name: 'Carlos Ray',
username: '@carl',
body: 'Great for testimonials and logos.',
img: 'https://randomuser.me/api/portraits/men/61.jpg',
country: '๐ช๐ธ Spain',
},
];
function TestimonialCard({ img, name, username, body, country }: (typeof testimonials)[number]) {
return (
<Card className="w-64">
<CardContent>
<div className="flex items-center gap-2.5">
<Avatar className="size-9">
<AvatarImage src={img} alt="@reui_io" />
<AvatarFallback>{name[0]}</AvatarFallback>
</Avatar>
<div className="flex flex-col">
<figcaption className="text-sm font-medium text-foreground flex items-center gap-1">
{name} <span className="text-xs">{country}</span>
</figcaption>
<p className="text-xs font-medium text-muted-foreground">{username}</p>
</div>
</div>
<blockquote className="mt-3 text-sm text-econdary-foreground">{body}</blockquote>
</CardContent>
</Card>
);
}
export default function MarqueeVertical() {
return (
<div className="relative flex h-[500px] w-full flex-row items-center justify-center overflow-hidden gap-1.5">
{/* Vertical Marquee (downwards) */}
<Marquee vertical pauseOnHover repeat={3} className="[--duration:40s]">
{testimonials.map((review) => (
<TestimonialCard key={review.username} {...review} />
))}
</Marquee>
{/* Vertical Marquee (upwards) */}
<Marquee vertical pauseOnHover reverse repeat={3} className="[--duration:40s]">
{testimonials.map((review) => (
<TestimonialCard key={review.username} {...review} />
))}
</Marquee>
{/* Gradient overlays for vertical marquee */}
<div className="pointer-events-none absolute inset-x-0 top-0 h-1/4 bg-gradient-to-b from-background"></div>
<div className="pointer-events-none absolute inset-x-0 bottom-0 h-1/4 bg-gradient-to-t from-background"></div>
</div>
);
}