Logos Carousel
Cycle through logos column by column in a staggered wave.
Installation

pnpm dlx shadcn@latest add @cortexcn/logos-carouselUsage
import { LogosCarousel } from "@/components/logos-carousel";<LogosCarousel className="h-16" columnCount={4}>
<img src="/logos/vercel.svg" alt="Vercel" />
<img src="/logos/nextjs.svg" alt="Next.js" />
<img src="/logos/react.svg" alt="React" />
<img src="/logos/stripe.svg" alt="Stripe" />
{/* ...more logos */}
</LogosCarousel>Each child is one logo. Logos are spread across the columns in order, so with 12 logos and 4 columns each column cycles through 3 logos. Give the carousel a height so the logos have room to animate.
Examples
Right to left
Set direction="rtl" to start the wave from the last column.
<LogosCarousel className="h-16" direction="rtl"> {logos.map((logo) => ( <Logo key={logo.name} {...logo} /> ))}</LogosCarousel>Fewer columns
columnCount controls how many logos are visible at once. It is capped at the number of logos.
<LogosCarousel className="h-16" columnCount={3}> {logos.map((logo) => ( <Logo key={logo.name} {...logo} /> ))}</LogosCarousel>Behavior
- The carousel only cycles while it is on screen and the browser tab is visible.
- With reduced motion enabled, logos cross-fade in place instead of sliding and blurring.
- Set the
--column-countCSS variable to change the visible columns at a breakpoint, for exampleclassName="[--column-count:2] md:[--column-count:4]".
Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | required | Logo elements to cycle through |
columnCount | number | 4 | Number of columns, capped at the logo count |
direction | "ltr" | "rtl" | "ltr" | Direction the wave travels across the columns |
className | string | - | Extra classes for the grid container |
