This component no longer exists. It was in ruixen-ui’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-12 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
Card Carousel Hero
ruixen-ui/card-carousel-heroRemovedComponent
An interactive hero section featuring a card carousel with smooth animations
Live preview
live · rendered by the registry
Rendered by ruixen-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://ruixen.com/r/card-carousel-hero.jsonSource
1"use client";23import React, { useRef, useEffect, useState } from "react";4import { Card, CardContent } from "@/components/ui/card";5import Image from "next/image";6import gsap from "gsap";7import { Button } from "@/components/ui/button";89export interface CardItem {10 src?: string;11 alt?: string;12}1314export interface CardCarouselHeroProps {15 category?: string;16 title?: string;17 subtitle?: string;18 cards?: CardItem[];19}2021export default function CardCarouselHero({22 category = "Innovation Meets Simplicity",23 title = "Build Exceptional Interfaces",24 subtitle = "Use our component library powered by Shadcn UI & Tailwind CSS to craft beautiful, fast, and accessible UIs.",25 cards = [],26}: CardCarouselHeroProps) {27 const totalCards = cards.length || 5;28 const placeholders = Array.from({ length: totalCards }).map(() => ({29 src: undefined,30 alt: "",31 }));32 const data = cards.length > 0 ? cards : placeholders;3334 const cardRefs = useRef<HTMLDivElement[]>([]);35 const [activeIndex, setActiveIndex] = useState(0);3637 const animateCards = () => {38 const middleIndex = Math.floor(data.length / 2);3940 gsap.set(cardRefs.current, {41 x: 0,42 scale: 0.5,43 opacity: 0,44 transformOrigin: "center bottom",45 });4647 const tl = gsap.timeline({48 defaults: { duration: 0.6, ease: "power3.out" },49 });5051 tl.to(cardRefs.current[middleIndex], { x: 0, scale: 1, opacity: 1 });5253 for (let offset = 1; offset <= middleIndex; offset++) {54 const leftIndex = middleIndex - offset;55 const rightIndex = middleIndex + offset;5657 const animations: gsap.TweenTarget[] = [];58 if (leftIndex >= 0) animations.push(cardRefs.current[leftIndex]);59 if (rightIndex < data.length)60 animations.push(cardRefs.current[rightIndex]);6162 tl.to(63 animations,64 {65 x: (i, target) => {66 const idx = cardRefs.current.indexOf(target as HTMLDivElement);67 return (idx - middleIndex) * 120;68 },69 scale: (i, target) => {70 const idx = cardRefs.current.indexOf(target as HTMLDivElement);71 return 1 - Math.abs(idx - middleIndex) * 0.1;72 },73 opacity: 1,74 },75 "+=0.1",76 );77 }78 };7980 useEffect(() => {81 animateCards();82 }, [activeIndex]);8384 return (85 <section className="py-20 px-4 bg-white dark:bg-black transition-colors duration-300">86// … truncated
What it pulls in
npm packages
Other registry items
