diff --git a/src/components/magicui/infinite-moving-cards.tsx b/src/components/magicui/infinite-moving-cards.tsx index 0cd023e..cad852c 100644 --- a/src/components/magicui/infinite-moving-cards.tsx +++ b/src/components/magicui/infinite-moving-cards.tsx @@ -62,12 +62,9 @@ export const InfiniteMovingCards = ({ ref={scrollerRef} className={cn( "flex min-w-full shrink-0 gap-16 py-4 w-max flex-nowrap", - start && "animate-scroll", - pauseOnHover && "hover:[animation-play-state:paused]", + start && (direction === "left" ? "animate-scroll-left" : "animate-scroll-right"), + pauseOnHover && "hover:[animation-play-state:paused]" )} - style={{ - "--animation-direction": direction === "left" ? "forwards" : "reverse", - } as React.CSSProperties} > {items.map((item, idx) => (
  • diff --git a/src/pages/agents/AgentLogos.tsx b/src/pages/agents/AgentLogos.tsx index b3eedb7..a34f91d 100644 --- a/src/pages/agents/AgentLogos.tsx +++ b/src/pages/agents/AgentLogos.tsx @@ -36,7 +36,7 @@ export const AgentLogos = () => { const rows = splitLogoRows(); return ( -
    +
    @@ -53,7 +53,7 @@ export const AgentLogos = () => {
    ))} direction={idx % 2 === 0 ? "left" : "right"} - speed={idx % 2 === 0 ? "fast" : "normal"} + speed="slow" pauseOnHover={true} className="w-full" /> diff --git a/src/styles/tailwind.css b/src/styles/tailwind.css index 16c23d9..fc092eb 100644 --- a/src/styles/tailwind.css +++ b/src/styles/tailwind.css @@ -4,11 +4,24 @@ @custom-variant dark (&:is(.dark *)); @theme { - --animate-scroll: scroll var(--animation-duration, 40s) var(--animation-direction, forwards) linear infinite; + --animate-scroll-left: scroll-left var(--animation-duration, 40s) linear infinite; + --animate-scroll-right: scroll-right var(--animation-duration, 40s) linear infinite; - @keyframes scroll { + @keyframes scroll-left { + from { + transform: translateX(0); + } to { - transform: translate(calc(-50% - 0.5rem)); + transform: translateX(calc(-50% - 0.5rem)); + } + } + + @keyframes scroll-right { + from { + transform: translateX(calc(-50% - 0.5rem)); + } + to { + transform: translateX(0); } }