// This template requires the Embla Auto Scroll plugin to be installed:
//
// npm install embla-carousel-auto-scroll
//
// Finally, edit the company logos in the logosRow1, logosRow2, and logosRow3 arrays to customize the logos displayed on the page.
'use client';
import AutoScroll from 'embla-carousel-auto-scroll';
import {
Carousel,
CarouselContent,
CarouselItem,
} from '@/components/ui/carousel';
const logosRow1 = [
{ id: 'adobe', alt: 'Adobe logo', image: '/logos/adobe.svg' },
{ id: 'gitlab', alt: 'GitLab logo', image: '/logos/gitlab.svg' },
{ id: 'github', alt: 'GitHub logo', image: '/logos/github.svg' },
{ id: 'hubspot', alt: 'HubSpot logo', image: '/logos/hubspot.svg' },
{ id: 'mailchimp', alt: 'Mailchimp logo', image: '/logos/mailchimp.svg' },
{ id: 'shopify', alt: 'Shopify logo', image: '/logos/shopify.svg' },
{ id: 'stripe', alt: 'Stripe logo', image: '/logos/stripe.svg' },
];
const logosRow2 = [
{ id: 'asana', alt: 'Asana logo', image: '/logos/asana.svg' },
{ id: 'canva', alt: 'Canva logo', image: '/logos/canva.svg' },
{ id: 'framer', alt: 'Framer logo', image: '/logos/framer.svg' },
{ id: 'grammarly', alt: 'Grammarly logo', image: '/logos/grammarly.svg' },
{ id: 'instagram', alt: 'Instagram logo', image: '/logos/instagram_word.svg' },
{ id: 'medium', alt: 'Medium logo', image: '/logos/medium.svg' },
{ id: 'slack', alt: 'Slack logo', image: '/logos/slack.svg' },
{ id: 'tinder', alt: 'Tinder logo', image: '/logos/tinder.svg' },
];
const logosRow3 = [
{ id: 'atlassian', alt: 'Atlassian logo', image: '/logos/atlassian.svg' },
{ id: 'dribbble', alt: 'Dribbble logo', image: '/logos/dribbble.svg' },
{ id: 'gumroad', alt: 'Gumroad logo', image: '/logos/gumroad.svg' },
{ id: 'linear', alt: 'Linear logo', image: '/logos/linear.svg' },
{ id: 'notion', alt: 'Notion logo', image: '/logos/notion.svg' },
{ id: 'spotify', alt: 'Spotify logo', image: '/logos/spotify.svg' },
{ id: 'whatsapp', alt: 'WhatsApp logo', image: '/logos/whatsapp.svg' }
];
const Logos1 = () => {
return (
<div>
<div className="container flex flex-col items-center text-center">
<h2 className="my-6 text-pretty text-xl font-bold lg:text-2xl">
TRUSTED and loved by 20+ tech first teams
</h2>
</div>
<CarouselWrapper direction="ltr" logos={logosRow1} />
<CarouselWrapper direction="rtl" logos={logosRow2} />
<CarouselWrapper direction="ltr" logos={logosRow3} />
</div>
);
};
export default Logos1;
type CarouselWrapperProps = {
direction?: 'ltr' | 'rtl';
logos: { id: string; alt: string; image: string }[];
};
const CarouselWrapper = ({ direction = 'ltr', logos }: CarouselWrapperProps) => {
return (
<div className="pt-6 md:pt-10 lg:pt-12">
<div className="relative mx-auto flex items-center justify-center lg:max-w-5xl">
<Carousel
opts={{ loop: true, direction }}
plugins={[AutoScroll({ playOnInit: true })]}
dir={direction}
className='pointer-events-none select-none'
>
<CarouselContent className="ml-0">
{logos.map((logo) => (
<CarouselItem
key={logo.id}
className="basis-1/3 pl-0 sm:basis-1/4 md:basis-1/5 lg:basis-1/6"
>
<div className="mx-10 flex shrink-0 items-center justify-center">
<img
src={logo.image}
alt={logo.alt}
className="h-8 w-auto"
/>
</div>
</CarouselItem>
))}
</CarouselContent>
</Carousel>
<div className="absolute inset-y-0 left-0 w-12 bg-gradient-to-r from-background to-transparent"></div>
<div className="absolute inset-y-0 right-0 w-12 bg-gradient-to-l from-background to-transparent"></div>
</div>
</div>
)
}