feat(ui): complete homepage overhaul with magicui animations, shiftable tools grid, bento grid, 3D visualizer, and marquee reviews
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
'use client';
|
||||
|
||||
import React from 'react';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
// Fallback helper in case cn isn't in @/lib/utils
|
||||
function classNames(...classes: (string | undefined | null | false)[]) {
|
||||
return classes.filter(Boolean).join(' ');
|
||||
}
|
||||
|
||||
interface MarqueeProps {
|
||||
className?: string;
|
||||
reverse?: boolean;
|
||||
pauseOnHover?: boolean;
|
||||
children?: React.ReactNode;
|
||||
vertical?: boolean;
|
||||
repeat?: number;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
export function Marquee({
|
||||
className,
|
||||
reverse,
|
||||
pauseOnHover = true,
|
||||
children,
|
||||
vertical = false,
|
||||
repeat = 4,
|
||||
...props
|
||||
}: MarqueeProps) {
|
||||
return (
|
||||
<div
|
||||
{...props}
|
||||
className={classNames(
|
||||
'group flex overflow-hidden p-2 [--duration:40s] [--gap:1.25rem] [gap:var(--gap)]',
|
||||
vertical ? 'flex-col' : 'flex-row',
|
||||
className
|
||||
)}
|
||||
>
|
||||
{Array(repeat)
|
||||
.fill(0)
|
||||
.map((_, i) => (
|
||||
<div
|
||||
key={i}
|
||||
className={classNames(
|
||||
'flex shrink-0 justify-around [gap:var(--gap)]',
|
||||
vertical
|
||||
? 'animate-marquee-vertical flex-col'
|
||||
: 'animate-marquee flex-row',
|
||||
pauseOnHover && 'group-hover:[animation-play-state:paused]',
|
||||
reverse && '[animation-direction:reverse]'
|
||||
)}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user