Shape Landing Hero — Componente de héroe con formas geométricas animadas
Sección de héroe obtenida de la galería MIT-licensed
pulkitxm/claude-directory.
Una integración del componente HeroGeometric de Kokonut UI: cinco formas borrosas con relleno degradado flotan detrás de un titular con recorte degradado sobre un lienzo casi negro #030303, todo impulsado por Framer Motion. El componente se inserta en una estructura de proyecto shadcn/ui y se envuelve en una experiencia de aterrizaje (navbar flotante, CTAs, un playground de props en vivo, cuadrícula de características, banda de instalación) que lo exhibe sobre el pliegue. Esta sección de héroe animada es un punto de partida ideal para páginas de aterrizaje de SaaS con temática oscura, herramientas de diseño o portafolios.
Flujo de trabajo
- Clonar
example.htmlen el espacio de trabajo del usuario como archivo de trabajo. - Reemplazar el contenido placeholder con el nombre real de la marca del usuario, titulares, cuerpo del texto, números e imágenes. Coincidir con las dimensiones de imagen existentes al intercambiar activos.
- Preservar el sistema de diseño. La paleta, la escala tipográfica, el ritmo de espaciado y el movimiento en la especificación de construcción a continuación son la identidad — no sustituir fuentes, recolorar la paleta ni eliminar elementos decorativos.
- Extender duplicando secciones, nunca importando un diseño de otra plantilla. Si falta una sección, diseñarla desde cero en el propio vocabulario de esta plantilla.
- Mantener la animación accesible. Cada animación debe permanecer detrás de
prefers-reduced-motion, según lo requiere la especificación de construcción.
Contrato de salida
Emitir entre etiquetas <artifact>:
<artifact identifier="shape-landing-hero" type="text/html" title="Shape Landing Hero — Componente de héroe con formas geométricas animadas">
<!doctype html>
<html>...</html>
</artifact>
Especificación de construcción
El prompt ascendente que produjo este diseño, textualmente.
INTEGRAR COMPONENTE
SE TE ASIGNA LA TAREA DE INTEGRAR UN COMPONENTE REACT EXISTENTE EN LA BASE DE CÓDIGO
LA BASE DE CÓDIGO DEBE SOPORTAR:
- ESTRUCTURA DE PROYECTO SHADCN
- TAILWIND CSS
- TYPESCRIPT
SI NO ES ASÍ, PROPORCIONAR INSTRUCCIONES SOBRE CÓMO CONFIGURAR EL PROYECTO MEDIANTE LA CLI DE SHADCN, INSTALAR TAILWIND O TYPESCRIPT.
DETERMINAR LA RUTA PREDETERMINADA PARA COMPONENTES Y ESTILOS. SI LA RUTA PREDETERMINADA PARA COMPONENTES NO ES /COMPONENTES/UI, PROPORCIONAR INSTRUCCIONES SOBRE POR QUÉ ES IMPORTANTE CREAR ESTA CARPETA. COPIAR Y PEGAR ESTE COMPONENTE EN LA CARPETA /COMPONENTES/UI:
shape-landing-hero.tsx
"use client";
import { motion, useMotionValue, useTransform, animate } from "framer-motion";
import { Circle } from "lucide-react";
import { useEffect, useState } from "react";
import { cn } from "@/lib/utils";
function ElegantShape({
className,
delay = 0,
width = 400,
height = 100,
rotate = 0,
gradient = "from-white/[0.08]",
}: {
className?: string;
delay?: number;
width?: number;
height?: number;
rotate?: number;
gradient?: string;
}) {
return (
<motion.div
initial={{
opacity: 0,
y: -150,
rotate: rotate - 15,
}}
animate={{
opacity: 1,
y: 0,
rotate: rotate,
}}
transition={{
duration: 2.4,
delay,
ease: [0.23, 0.86, 0.39, 0.96],
opacity: { duration: 1.2 },
}}
className={cn("absolute", className)}
>
<motion.div
animate={{
y: [0, 15, 0],
}}
transition={{
duration: 12,
repeat: Number.POSITIVE_INFINITY,
ease: "easeInOut",
}}
style={{
width,
height,
}}
className="relative"
>
<div
className={cn(
"absolute inset-0 rounded-full",
"bg-gradient-to-r to-transparent",
gradient,
"backdrop-blur-[2px] border-2 border-white/[0.15]",
"shadow-[0_8px_32px_0_rgba(255,255,255,0.1)]",
"after:absolute after:inset-0 after:rounded-full",
"after:bg-[radial-gradient(circle_at_50%_50%,rgba(255,255,255,0.2),transparent_70%)]"
)}
/>
</motion.div>
</motion.div>
);
}
function HeroGeometric({
badge = "Design Collective",
title1 = "Elevate Your Digital Vision",
title2 = "Crafting Exceptional Websites",
}: {
badge?: string;
title1?: string;
title2?: string;
}) {
const fadeUpVariants = {
hidden: { opacity: 0, y: 30 },
visible: (i: number) => ({
opacity: 1,
y: 0,
transition: {
duration: 1,
delay: 0.5 + i * 0.2,
ease: [0.25, 0.4, 0.25, 1],
},
}),
};
return (
<div className="relative min-h-screen w-full flex items-center justify-center overflow-hidden bg-[#030303]">
<div className="absolute inset-0 bg-gradient-to-br from-indigo-500/[0.05] via-transparent to-rose-500/[0.05] blur-3xl" />
<div className="absolute inset-0 overflow-hidden">
<ElegantShape
delay={0.3}
width={600}
height={140}
rotate={12}
gradient="from-indigo-500/[0.15]"
className="left-[-10%] md:left-[-5%] top-[15%] md:top-[20%]"
/>
<ElegantShape
delay={0.5}
width={500}
height={120}
rotate={-15}
gradient="from-rose-500/[0.15]"
className="right-[-5%] md:right-[0%] top-[70%] md:top-[75%]"
/>
<ElegantShape
delay={0.4}
width={300}
height={80}
rotate={-8}
gradient="from-violet-500/[0.15]"
className="left-[5%] md:left-[10%] bottom-[5%] md:bottom-[10%]"
/>
<ElegantShape
delay={0.6}
width={200}
height={60}
rotate={20}
gradient="from-amber-500/[0.15]"
className="right-[15%] md:right-[20%] top-[10%] md:top-[15%]"
/>
<ElegantShape
delay={0.7}
width={150}
height={40}
rotate={-25}
gradient="from-cyan-500/[0.15]"
className="left-[20%] md:left-[25%] top-[5%] md:top-[10%]"
/>
</div>
<div className="relative z-10 container mx-auto px-4 md:px-6">
<div className="max-w-3xl mx-auto text-center">
<motion.div
custom={0}
variants={fadeUpVariants}
initial="hidden"
animate="visible"
className="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-white/[0.03] border border-white/[0.08] mb-8 md:mb-12"
>
<Circle className="h-2 w-2 fill-rose-500/80" />
<span className="text-sm text-white/60 tracking-wide">
{badge}
</span>
</motion.div>
<motion.div
custom={1}
variants={fadeUpVariants}
initial="hidden"
animate="visible"
>
<h1 className="text-4xl sm:text-6xl md:text-8xl font-bold mb-6 md:mb-8 tracking-tight">
<span className="bg-clip-text text-transparent bg-gradient-to-b from-white to-white/80">
{title1}
</span>
<br />
<span
className={cn(
"bg-clip-text text-transparent bg-gradient-to-r from-indigo-300 via-white/90 to-rose-300 "
)}
>
{title2}
</span>
</h1>
</motion.div>
<motion.div
custom={2}
variants={fadeUpVariants}
initial="hidden"
animate="visible"
>
<p className="text-base sm:text-lg md:text-xl text-white/40 mb-8 leading-relaxed font-light tracking-wide max-w-xl mx-auto px-4">
Creando experiencias digitales excepcionales a través del diseño innovador y la tecnología de punta.
</p>
</motion.div>
</div>
</div>
<div className="absolute inset-0 bg-gradient-to-t from-[#030303] via-transparent to-[#030303]/80 pointer-events-none" />
</div>
);
}
export { HeroGeometric }
demo.tsx
import { HeroGeometric } from "@/components/ui/shape-landing-hero"
function DemoHeroGeometric() {
return <HeroGeometric badge="Kokonut UI"
title1 = "Eleva tu"
title2 = "Visión Digital" />
}
export { DemoHeroGeometric }
INSTALAR DEPENDENCIAS NPM:
lucide-react, framer-motion
PAUTAS DE IMPLEMENTACIÓN
- ANALIZAR LA ESTRUCTURA DEL COMPONENTE E IDENTIFICAR TODAS LAS DEPENDENCIAS REQUERIDAS
- REVISAR LOS ARGUMENTOS Y EL ESTADO DEL COMPONENTE
- IDENTIFICAR CUALQUIER PROVIDER DE CONTEXTO O HOOKS REQUERIDOS E INSTALARLOS
- PREGUNTAS A REALIZAR
- ¿QUÉ DATOS/PROPS SE PASARÁN A ESTE COMPONENTE?
- ¿HAY REQUISITOS ESPECÍFICOS DE GESTIÓN DE ESTADO?
- ¿HAY ACTIVOS REQUERIDOS (IMÁGENES, ICONOS, ETC.)?
- ¿CUÁL ES EL COMPORTAMIENTO RESPONSIVO ESPERADO?
- ¿CUÁL ES EL MEJOR LUGAR PARA USAR ESTE COMPONENTE EN LA APLICACIÓN?
PASOS PARA INTEGRAR
- COPIAR Y PEGAR TODO EL CÓDIGO ANTERIOR EN LOS DIRECTORIOS CORRECTOS
- INSTALAR DEPENDENCIAS EXTERNAS
- RELLENAR LOS ACTIVOS DE IMAGEN CON IMÁGENES DE STOCK DE UNSPLASH QUE SEPAS QUE EXISTEN
- USAR ICONOS DE LUCIDE-REACT PARA SVGS O LOGOS SI EL COMPONENTE LOS REQUIERE
Fuente y licencia
Obtenido de pulkitxm/claude-directory con licencia MIT. El texto de la licencia MIT original se incluye en esta plantilla en LICENSE y debe redistribuirse junto con cualquier copia de example.html o assets/.
Las fuentes web y las imágenes de alta resolución no están incluidas: las reglas locales @font-face se sirven desde la CDN de Google Fonts y las imágenes referenciadas están reducidas de escala. Obtén la carpeta original para los activos originales.