BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/eldoraui/logo-cloud-04

logo-cloud-04

eldoraui/logo-cloud-04
FreeBlock

A logo cloud with motion.

Live preview

live · rendered by the registry
Rendered by eldoraui on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://eldoraui.site/r/logo-cloud-04.json

Source

registry/blocks/logo-cloud-04/components/logo-cloud-04.tsxeldoraui.site/r/logo-cloud-04.json
1"use client"
2
3import { useCallback, useEffect, useMemo, useRef, useState } from "react"
4
5import { cn } from "@/lib/utils"
6
7import { AnimatedLogoColumn, type Logo } from "./animated-logo-column"
8
9const LOGOS: Logo[] = [
10 {
11 id: 1,
12 name: "Google",
13 src: "https://pub-b3533f2e1c954842824758490b95c9d5.r2.dev/Google.svg",
14 },
15 {
16 id: 2,
17 name: "GitHub",
18 src: "https://pub-b3533f2e1c954842824758490b95c9d5.r2.dev/GitHub.svg",
19 },
20 {
21 id: 3,
22 name: "Amazon",
23 src: "https://pub-b3533f2e1c954842824758490b95c9d5.r2.dev/Amazon.svg",
24 },
25 {
26 id: 4,
27 name: "Netflix",
28 src: "https://pub-b3533f2e1c954842824758490b95c9d5.r2.dev/Netflix.svg",
29 },
30 {
31 id: 5,
32 name: "YouTube",
33 src: "https://pub-b3533f2e1c954842824758490b95c9d5.r2.dev/YouTube.svg",
34 },
35 {
36 id: 6,
37 name: "Instagram",
38 src: "https://pub-b3533f2e1c954842824758490b95c9d5.r2.dev/Instagram.svg",
39 },
40]
41
42const TICK_MS = 100
43
44/**
45 * Deterministic distribution (no Math.random) so server and client
46 * render the same columns and hydration matches.
47 */
48function distributeLogos(logos: Logo[], columnCount: number): Logo[][] {
49 const result: Logo[][] = Array.from({ length: columnCount }, () => [])
50
51 logos.forEach((logo, index) => {
52 result[index % columnCount].push(logo)
53 })
54
55 const maxLength = Math.max(...result.map((col) => col.length))
56 result.forEach((col, colIndex) => {
57 while (col.length < maxLength) {
58 col.push(logos[(col.length * columnCount + colIndex) % logos.length])
59 }
60 })
61
62 return result
63}
64
65export type LogoCarouselVariant = "default" | "compact"
66
67interface LogoCarouselProps {
68 columns?: number
69 logos?: Logo[]
70 variant?: LogoCarouselVariant
71 className?: string
72}
73
74export function LogoCarousel({
75 columns = 4,
76 logos: logosProp,
77 variant = "default",
78 className,
79}: LogoCarouselProps) {
80 const logos = useMemo(() => logosProp ?? LOGOS, [logosProp])
81 const distribute = useCallback(
82 (count: number) => distributeLogos(logos, count),
83 [logos]
84 )
85
86 const [logoColumns, setLogoColumns] = useState<Logo[][]>(() =>
87 distributeLogos(logos, columns)
88 )
89 const [time, setTime] = useState(0)
90 const prevColumnsRef = useRef(columns)
91
92 useEffect(() => {
93 if (prevColumnsRef.current !== columns) {
94 prevColumnsRef.current = columns
95 setLogoColumns(distribute(columns))
96 }
97 }, [columns, distribute])
98
99 useEffect(() => {
100 const interval = setInterval(() => {
101 setTime((prev) => prev + TICK_MS)
102// … truncated

What it pulls in

npm packages

  • motion/react

Files it writes

  • registry/blocks/logo-cloud-04/page.tsx
  • registry/blocks/logo-cloud-04/components/logo-cloud-04.tsx

Facts

Registry
eldoraui
Type
registry:block
Access
Free
Files written
2
Licence
the repository states none
First indexed
2026-08-03
Last confirmed
yesterday

Go to the source

Docs on eldoraui eldoraui.site karthikmudunuri/eldoraui on GitHub Raw registry item This item as JSON

More from eldoraui

All 115 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
cta-01cta-01eldorauiBlocksFree2 deps · 2 files
cta-02cta-02eldorauiBlocksFree2 deps · 3 files
cta-03cta-03eldorauiBlocksFree1 dep · 3 files
features-01features-01eldorauiBlocksFree3 deps · 3 files
footer-01footer-01eldorauiBlocksFree1 dep · 3 files
header-01header-01eldorauiBlocksFree3 deps · 5 files
header-02header-02eldorauiBlocksFree3 deps · 2 files
logo-cloud-01logo-cloud-01eldorauiBlocksFree1 dep · 2 files
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex