logo-timeline
eldoraui/logo-timelineFreeComponent
An animated logo timeline component with horizontal scrolling logos.
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-timeline.jsonSource
1"use client"23import type React from "react"4import { useState } from "react"5import { motion } from "motion/react"67import { cn } from "@/lib/utils"8import { Icons } from "@/components/icons"910export interface LogoItem {11 /** The label text displayed next to the icon */12 label: string13 /** The icon name from the Icons object (e.g., "gitHub", "react", "tailwind") */14 icon: keyof typeof Icons15 /** Animation delay in seconds (use negative values for staggered effect) */16 animationDelay: number17 /** Animation duration in seconds */18 animationDuration: number19 /** The row number where this logo should appear (1-based) */20 row: number21}2223export interface LogoTimelineProps {24 /** Array of logo items to display */25 items: LogoItem[]26 /** Optional title text to display in the center */27 title?: string28 /** Height of the timeline container */29 height?: string30 /** Additional className for the container */31 className?: string32 /** Icon size in pixels (default: 16) */33 iconSize?: number34 /** Whether to show separator lines between rows (default: true) */35 showRowSeparator?: boolean36 /** Whether to animate logos only on hover (default: false) */37 animateOnHover?: boolean38}3940export function LogoTimeline({41 items,42 title,43 height = "h-[400px] sm:h-[800px]",44 className,45 iconSize = 16,46 showRowSeparator = true,47 animateOnHover = false,48}: LogoTimelineProps) {49 const [isHovered, setIsHovered] = useState(false)5051 // Group items by row52 const rowsMap = new Map<number, LogoItem[]>()53 items.forEach((item) => {54 if (!rowsMap.has(item.row)) {55 rowsMap.set(item.row, [])56 }57 rowsMap.get(item.row)?.push(item)58 })5960 // Convert map to sorted array61 const rows = Array.from(rowsMap.entries())62 .sort(([a], [b]) => a - b)63 .map(([, rowItems]) => rowItems)6465 // Determine animation play state66 const animationPlayState = animateOnHover67 ? isHovered68 ? "running"69 : "paused"70 : "running"7172 const getIconComponent = (iconName: keyof typeof Icons) => {73 const Icon = Icons[iconName]74 if (!Icon) {75 return null76 }77 return (78 <Icon79 className="shrink-0"80 style={{ width: iconSize, height: iconSize }}81 aria-hidden="true"82 />83 )84 }8586 return (87 <section className={cn("w-full", height, className)}>88 <motion.div89 aria-hidden="true"90 className="bg-background relative h-full w-full overflow-hidden py-24 ring-inset sm:py-32"91// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from eldoraui
All 115 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| animated-badgeanimated-badge | eldoraui | Components | Free | 2 deps | |
| animated-frameworksanimated-frameworks | eldoraui | Components | Free | 2 deps | |
| animated-grid-patternanimated-grid-pattern | eldoraui | Components | Free | 3 deps | |
| animated-listanimated-list | eldoraui | Components | Free | 1 dep | |
| animated-shiny-buttonanimated-shiny-button | eldoraui | Components | Free | 1 dep | |
| blur-in-textblur-in-text | eldoraui | Components | Free | 3 deps | |
| browserbrowser | eldoraui | Components | Free | 2 deps | |
| card-flip-hovercard-flip-hover | eldoraui | Components | Free | 1 dep |
