{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "hero21",
  "title": "Fullscreen Vertical Carousel",
  "description": "Full-screen carousel with vertical slide transitions, decorative grid lines, and customizable accent colors. Perfect for creative agencies and modern brand showcases.",
  "dependencies": [
    "clsx",
    "tailwind-merge",
    "lucide-react",
    "framer-motion"
  ],
  "registryDependencies": [
    "badge",
    "button"
  ],
  "files": [
    {
      "path": "registry/hero21/hero21.tsx",
      "content": "\"use client\";\n\nimport { AnimatePresence, motion, type Transition, type Variants } from \"framer-motion\";\nimport { ChevronDown, ChevronUp } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useCallback, useEffect, useState } from \"react\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils\";\n\ntype TransitionType = \"fade\" | \"slide\" | \"scale\" | \"flip\" | \"cube\";\n\ninterface ButtonItem {\n  id: string;\n  label: string;\n  href?: string;\n  variant?: \"default\" | \"secondary\" | \"outline\" | \"ghost\" | \"link\" | \"destructive\";\n  icon?: React.ReactNode;\n}\n\ninterface HeroSlide {\n  id: string;\n  badge?: {\n    label: string;\n    variant?: \"default\" | \"secondary\" | \"outline\";\n  };\n  heading?: string;\n  description?: string;\n  image?: {\n    src: string;\n    alt: string;\n  };\n  buttons?: ButtonItem[];\n}\n\ninterface Hero21Props {\n  slides: HeroSlide[];\n  autoPlay?: boolean;\n  interval?: number;\n  transition?: TransitionType;\n  showCounter?: boolean;\n  showNavDots?: boolean;\n  showArrows?: boolean;\n  accentColor?: string;\n  className?: string;\n}\n\nexport const hero21Demo: Hero21Props = {\n  slides: [\n    {\n      id: \"slide-1\",\n      badge: { label: \"Featured\", variant: \"default\" },\n      heading: \"Discover the Future\",\n      description:\n        \"Experience the next generation of digital innovation. Where imagination meets reality.\",\n      image: {\n        src: \"https://images.unsplash.com/photo-1765706729547-57ad9c7f2814?q=90&w=2971&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n        alt: \"Digital globe visualization\",\n      },\n      buttons: [\n        { id: \"btn-1\", label: \"Explore Now\", href: \"https://beste.co\" },\n        {\n          id: \"btn-2\",\n          label: \"Learn More\",\n          href: \"https://beste.co\",\n          variant: \"outline\",\n        },\n      ],\n    },\n    {\n      id: \"slide-2\",\n      badge: { label: \"Innovation\", variant: \"secondary\" },\n      heading: \"Build Tomorrow\",\n      description:\n        \"Create extraordinary experiences with cutting-edge technology and seamless design.\",\n      image: {\n        src: \"https://images.unsplash.com/photo-1765706729287-953837a94f4d?q=80&w=1588&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n        alt: \"Technology circuit board\",\n      },\n      buttons: [{ id: \"btn-1\", label: \"Get Started\", href: \"https://beste.co\" }],\n    },\n    {\n      id: \"slide-3\",\n      badge: { label: \"Premium\", variant: \"default\" },\n      heading: \"Unlock Potential\",\n      description: \"Transform your vision into reality with powerful tools designed for creators.\",\n      image: {\n        src: \"https://images.unsplash.com/photo-1765706729055-73ed78d19202?q=80&w=2971&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n        alt: \"Abstract digital art\",\n      },\n      buttons: [\n        { id: \"btn-1\", label: \"Start Free\", href: \"https://beste.co\" },\n        {\n          id: \"btn-2\",\n          label: \"View Pricing\",\n          href: \"https://beste.co\",\n          variant: \"outline\",\n        },\n      ],\n    },\n  ],\n  autoPlay: true,\n  interval: 5000,\n  transition: \"slide\",\n  showCounter: true,\n  showNavDots: true,\n  showArrows: true,\n  accentColor: \"#7590ca\",\n};\n\nconst getSlideVariants = (transition: TransitionType): Variants => {\n  switch (transition) {\n    case \"slide\":\n      return {\n        enter: (direction: number) => ({\n          y: direction > 0 ? \"100%\" : \"-100%\",\n          opacity: 0,\n        }),\n        center: {\n          y: 0,\n          opacity: 1,\n        },\n        exit: (direction: number) => ({\n          y: direction < 0 ? \"100%\" : \"-100%\",\n          opacity: 0,\n        }),\n      };\n    case \"scale\":\n      return {\n        enter: {\n          scale: 0.8,\n          opacity: 0,\n        },\n        center: {\n          scale: 1,\n          opacity: 1,\n        },\n        exit: {\n          scale: 1.2,\n          opacity: 0,\n        },\n      };\n    case \"flip\":\n      return {\n        enter: (direction: number) => ({\n          rotateX: direction > 0 ? 90 : -90,\n          opacity: 0,\n        }),\n        center: {\n          rotateX: 0,\n          opacity: 1,\n        },\n        exit: (direction: number) => ({\n          rotateX: direction < 0 ? 90 : -90,\n          opacity: 0,\n        }),\n      };\n    case \"cube\":\n      return {\n        enter: (direction: number) => ({\n          rotateY: direction > 0 ? 90 : -90,\n          x: direction > 0 ? \"50%\" : \"-50%\",\n          opacity: 0,\n        }),\n        center: {\n          rotateY: 0,\n          x: 0,\n          opacity: 1,\n        },\n        exit: (direction: number) => ({\n          rotateY: direction < 0 ? 90 : -90,\n          x: direction < 0 ? \"50%\" : \"-50%\",\n          opacity: 0,\n        }),\n      };\n    default: // fade\n      return {\n        enter: {\n          opacity: 0,\n        },\n        center: {\n          opacity: 1,\n        },\n        exit: {\n          opacity: 0,\n        },\n      };\n  }\n};\n\nconst getTransitionConfig = (transition: TransitionType): Transition => {\n  switch (transition) {\n    case \"slide\":\n      return {\n        y: { type: \"spring\", stiffness: 300, damping: 30 },\n        opacity: { duration: 0.4 },\n      };\n    case \"scale\":\n      return {\n        duration: 0.6,\n        ease: [0.32, 0.72, 0, 1],\n      };\n    case \"flip\":\n    case \"cube\":\n      return {\n        duration: 0.8,\n        ease: [0.645, 0.045, 0.355, 1],\n      };\n    default:\n      return {\n        duration: 0.5,\n        ease: \"easeInOut\",\n      };\n  }\n};\n\nconst contentVariants: Variants = {\n  hidden: { opacity: 0, y: 60 },\n  visible: (custom: number) => ({\n    opacity: 1,\n    y: 0,\n    transition: {\n      delay: 0.2 + custom * 0.1,\n      duration: 0.6,\n      ease: [0.22, 1, 0.36, 1],\n    },\n  }),\n  exit: {\n    opacity: 0,\n    y: -30,\n    transition: { duration: 0.3 },\n  },\n};\n\nexport function Hero21({\n  slides,\n  autoPlay = true,\n  interval = 5000,\n  transition = \"slide\",\n  showCounter = true,\n  showNavDots = true,\n  showArrows = true,\n  accentColor = \"#7590ca\",\n  className,\n}: Hero21Props) {\n  const [currentIndex, setCurrentIndex] = useState(0);\n  const [direction, setDirection] = useState(0);\n  const [isPaused, setIsPaused] = useState(false);\n\n  const slideCount = slides.length;\n  const currentSlide = slides[currentIndex];\n\n  const slideVariants = getSlideVariants(transition);\n  const transitionConfig = getTransitionConfig(transition);\n\n  const paginate = useCallback(\n    (newDirection: number) => {\n      setDirection(newDirection);\n      if (newDirection === 1) {\n        setCurrentIndex((prev) => (prev + 1) % slideCount);\n      } else {\n        setCurrentIndex((prev) => (prev - 1 + slideCount) % slideCount);\n      }\n    },\n    [slideCount]\n  );\n\n  const goToSlide = useCallback(\n    (index: number) => {\n      setDirection(index > currentIndex ? 1 : -1);\n      setCurrentIndex(index);\n    },\n    [currentIndex]\n  );\n\n  useEffect(() => {\n    if (!autoPlay || slideCount <= 1 || isPaused) return;\n\n    const timer = setInterval(() => {\n      setDirection(1);\n      setCurrentIndex((prev) => (prev + 1) % slideCount);\n    }, interval);\n\n    return () => clearInterval(timer);\n  }, [autoPlay, interval, slideCount, isPaused]);\n\n  if (!currentSlide || slideCount === 0) return null;\n\n  return (\n    <section\n      className={cn(\n        \"relative w-full min-h-[600px] h-screen overflow-hidden bg-neutral-950\",\n        className\n      )}\n      onMouseEnter={() => setIsPaused(true)}\n      onMouseLeave={() => setIsPaused(false)}\n    >\n      {/* Fullscreen Background with AnimatePresence */}\n      <AnimatePresence initial={false} custom={direction} mode=\"sync\">\n        <motion.div\n          key={currentIndex}\n          custom={direction}\n          variants={slideVariants}\n          initial=\"enter\"\n          animate=\"center\"\n          exit=\"exit\"\n          transition={transitionConfig}\n          className=\"absolute inset-0\"\n          style={{ perspective: \"1200px\" }}\n        >\n          {currentSlide.image && (\n            <div className=\"absolute inset-0\">\n              <img\n                className=\"absolute inset-0 size-full object-cover\"\n                src={currentSlide.image.src}\n                alt={currentSlide.image.alt}\n              />\n              {/* Overlay gradients */}\n              <div className=\"absolute inset-0 bg-gradient-to-t from-neutral-950 via-neutral-950/60 to-neutral-950/30\" />\n              <div className=\"absolute inset-0 bg-gradient-to-r from-neutral-950/80 via-transparent to-transparent\" />\n            </div>\n          )}\n        </motion.div>\n      </AnimatePresence>\n\n      {/* Decorative grid lines */}\n      <div className=\"absolute inset-0 pointer-events-none\">\n        <div className=\"absolute left-[10%] top-0 bottom-0 w-px bg-white/5\" />\n        <div className=\"absolute left-[90%] top-0 bottom-0 w-px bg-white/5\" />\n        <div className=\"absolute top-[20%] left-0 right-0 h-px bg-white/5\" />\n        <div className=\"absolute top-[80%] left-0 right-0 h-px bg-white/5\" />\n      </div>\n\n      {/* Main Content with AnimatePresence */}\n      <div className=\"relative h-full container mx-auto px-8 lg:px-32 flex items-center\">\n        <div className=\"w-full max-w-3xl\">\n          <AnimatePresence mode=\"wait\">\n            <motion.div\n              key={`content-${currentIndex}`}\n              initial=\"hidden\"\n              animate=\"visible\"\n              exit=\"exit\"\n              className=\"flex flex-col gap-6\"\n            >\n              {/* Badge */}\n              {currentSlide.badge && (\n                <motion.div variants={contentVariants} custom={0}>\n                  <Badge variant={currentSlide.badge.variant ?? \"default\"} className=\"w-fit\">\n                    {currentSlide.badge.label}\n                  </Badge>\n                </motion.div>\n              )}\n\n              {/* Heading */}\n              {currentSlide.heading && (\n                <motion.h1\n                  variants={contentVariants}\n                  custom={1}\n                  className=\"text-5xl sm:text-6xl lg:text-7xl xl:text-8xl font-bold text-white tracking-tight leading-[1.05]\"\n                >\n                  {currentSlide.heading}\n                </motion.h1>\n              )}\n\n              {/* Description */}\n              {currentSlide.description && (\n                <motion.p\n                  variants={contentVariants}\n                  custom={2}\n                  className=\"text-lg sm:text-xl text-white/60 max-w-xl leading-relaxed\"\n                >\n                  {currentSlide.description}\n                </motion.p>\n              )}\n\n              {/* Buttons */}\n              {currentSlide.buttons && currentSlide.buttons.length > 0 && (\n                <motion.div\n                  variants={contentVariants}\n                  custom={3}\n                  className=\"flex flex-wrap gap-4 mt-4\"\n                >\n                  {currentSlide.buttons.map((button) => (\n                    <Button\n                      key={button.id}\n                      variant={button.variant ?? \"default\"}\n                      asChild\n                      className={button.icon ? \"gap-2\" : undefined}\n                    >\n                      <Link href={button.href ?? \"#\"}>\n                        {button.label}\n                        {button.icon}\n                      </Link>\n                    </Button>\n                  ))}\n                </motion.div>\n              )}\n            </motion.div>\n          </AnimatePresence>\n        </div>\n      </div>\n\n      {/* Slide Counter - Left Side */}\n      {showCounter && slideCount > 1 && (\n        <div className=\"absolute left-6 lg:left-12 top-1/2 -translate-y-1/2 hidden md:flex flex-col items-center gap-4 z-10 w-16\">\n          <span className=\"text-6xl lg:text-7xl font-bold text-white/10\">\n            {String(currentIndex + 1).padStart(2, \"0\")}\n          </span>\n          <div className=\"w-px h-16\" style={{ backgroundColor: accentColor }} />\n          <span className=\"text-sm text-white/40 font-mono\">\n            {String(slideCount).padStart(2, \"0\")}\n          </span>\n        </div>\n      )}\n\n      {/* Navigation Dots - Right Side */}\n      {showNavDots && slideCount > 1 && (\n        <div className=\"absolute right-6 lg:right-12 top-1/2 -translate-y-1/2 flex flex-col items-center gap-3 z-10\">\n          {slides.map((_, idx) => (\n            <button\n              type=\"button\"\n              key={idx}\n              onClick={() => goToSlide(idx)}\n              className={cn(\n                \"transition-all duration-300 rounded-full\",\n                idx === currentIndex ? \"w-3 h-8\" : \"w-2 h-2 bg-white/30 hover:bg-white/50\"\n              )}\n              style={idx === currentIndex ? { backgroundColor: accentColor } : undefined}\n            />\n          ))}\n        </div>\n      )}\n\n      {/* Up/Down Arrows - Bottom Center */}\n      {showArrows && slideCount > 1 && (\n        <div className=\"absolute bottom-8 left-1/2 -translate-x-1/2 flex items-center gap-4 z-10\">\n          <button\n            type=\"button\"\n            onClick={() => paginate(-1)}\n            className=\"w-12 h-12 rounded-full border border-white/20 flex items-center justify-center text-white hover:bg-white/10 hover:border-white/40 transition-all group\"\n          >\n            <ChevronUp className=\"size-6 group-hover:-translate-y-0.5 transition-transform\" />\n          </button>\n          <div className=\"text-white/40 font-mono text-sm\">\n            {String(currentIndex + 1).padStart(2, \"0\")} / {String(slideCount).padStart(2, \"0\")}\n          </div>\n          <button\n            type=\"button\"\n            onClick={() => paginate(1)}\n            className=\"w-12 h-12 rounded-full border border-white/20 flex items-center justify-center text-white hover:bg-white/10 hover:border-white/40 transition-all group\"\n          >\n            <ChevronDown className=\"size-6 group-hover:translate-y-0.5 transition-transform\" />\n          </button>\n        </div>\n      )}\n\n      {/* Progress Bar */}\n      {autoPlay && slideCount > 1 && (\n        <div className=\"absolute bottom-0 left-0 right-0 h-1 bg-white/10 z-10\">\n          <motion.div\n            key={currentIndex}\n            className=\"h-full\"\n            style={{ backgroundColor: accentColor }}\n            initial={{ width: \"0%\" }}\n            animate={{ width: isPaused ? undefined : \"100%\" }}\n            transition={{\n              duration: interval / 1000,\n              ease: \"linear\",\n            }}\n          />\n        </div>\n      )}\n    </section>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/block/hero21.tsx"
    }
  ],
  "type": "registry:block"
}