Communitygithub.com

Shape Landing Hero — 动画几何形状英雄组件

将 Kokonut UI 的 `HeroGeometric` 组件集成到基于 shadcn/ui 的项目中,实现动画几何形状英雄区,适用于深色主题的 SaaS、设计工具或作品集登陆页面。

Shape Landing Hero — 动画几何形状英雄组件 是什么?

此技能将 Kokonut UI 的 `HeroGeometric` 组件集成到 shadcn/ui 项目结构中。组件展示五个模糊、渐变填充的形状,在近黑色 `#030303` 背景上,通过 Framer Motion 驱动,漂浮在渐变裁剪的标题后方。它包含完整的登陆体验:浮动导航栏、行动号召按钮、实时属性演示、功能网格和安装区域。该技能自动创建组件文件(`shape-landing-hero.tsx` 和 `demo.tsx`),安装必要依赖(`lucide-react` 和 `framer-motion`),并指导用户替换占位内容为真实品牌信息。所有动画都遵循 `prefers-reduced-motion` 可访问性要求。该组件基于 MIT 许可证,来源于 `pulkitxm/claude-directory` 仓库。用户可以通过 `HeroGeometric` 组件的 `badge`、`title1` 和 `title2` 属性自定义文本内容。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ZeroSum-Solutions/mishmash/tree/HEAD/design-templates/shape-landing-hero

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Shape Landing Hero — 动画几何形状英雄组件 是做什么的?

英雄区模块来源于 MIT 许可的 pulkitxm/claude-directory 画廊。

将 Kokonut UI 的 HeroGeometric 组件集成到项目中——五个模糊、渐变填充的形状在近黑色 #030303 画布上,通过 Framer Motion 驱动,漂浮在渐变裁剪的标题后方。组件被放置到标准的 shadcn/ui 项目结构中,并包装在登陆体验(浮动导航栏、行动号召按钮、实时属性演示、功能网格、安装区域)中,在首屏上方展示。此动画英雄区是深色主题 SaaS、设计工具或作品集登陆页面的理想起点。

工作流程

  1. 克隆 example.html 到用户的工作空间作为工作文件。
  2. 替换占位内容 为用户的真实品牌名称、标题、正文、数据和图像。替换资源时保持现有图像尺寸。
  3. 保留设计系统。 下方构建规范中的调色板、字体比例、间距节奏和动效是身份特征——不要替换字体、更改调色板或移除装饰元素。
  4. 通过复制部分进行扩展,绝不要从其他模板导入布局。如果缺少某个部分,请以该模板自身的语言从头设计。
  5. 保持动效可访问。 根据构建规范要求,每个动画必须遵循 prefers-reduced-motion。

输出约定

在 <artifact> 标签之间输出:

<artifact identifier="shape-landing-hero" type="text/html" title="Shape Landing Hero — 动画几何形状英雄组件">
<!doctype html>
<html>...</html>
</artifact>

构建规范

以下是生成此设计的原始提示(逐字保留)。

集成组件

你被要求将现有 React 组件集成到代码库中。

代码库应支持:

  • SHADCN 项目结构
  • TAILWIND CSS
  • TYPESCRIPT

如果不支持,请提供通过 SHADCN CLI 设置项目、安装 Tailwind 或 TypeScript 的说明。

确定组件的默认路径和样式路径。 如果组件的默认路径不是 /components/ui,请说明创建此文件夹的重要性。 将此组件复制粘贴到 /components/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">
                            通过创新设计和前沿技术,打造卓越的数字体验。
                        </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 = "Elevate Your"
            title2 = "Digital Vision" />
}

export { DemoHeroGeometric }

安装 NPM 依赖:

lucide-react, framer-motion

实现指南

  1. 分析组件结构,识别所有必需的依赖项。
  2. 审查组件的参数和状态。
  3. 识别任何必需的上下文提供者或钩子并安装它们。
  4. 需要询问的问题
  • 将向此组件传递哪些数据/属性?
  • 是否有特定的状态管理要求?
  • 是否有必需的资源(图像、图标等)?
  • 预期的响应式行为是什么?
  • 在应用程序中使用此组件的最佳位置是哪里?

集成步骤

  1. 将上述所有代码复制粘贴到正确的目录中。
  2. 安装外部依赖项。
  3. 用您知道存在的 Unsplash 库存图像填充图像资源。
  4. 如果组件需要,使用 lucide-react 图标用于 SVG 或 Logo。

来源与许可证

模块来源于 MIT 许可证的 pulkitxm/claude-directory。 上游 MIT 许可证文本随此模板一起提供,位于 LICENSE,并且在任何分发 example.html 或 assets/ 的副本时必须一并重新分发。

Web 字体和高分辨率图像不包含在此模块中:本地 @font-face 规则从 Google Fonts CDN 提供,引用的图像已缩小。获取上游文件夹以获取原始资源。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ZeroSum-Solutions/mishmash

Two-section scroll landing for **S.P.D**, a fictional daily-operations automation platform. Section one is a full-bleed black hero: a muted, looping period-painting video plays edge to edge behind a top-left wordmark and tagline, a top-right pill CTA, and a large right-aligned serif headline low in the frame. A cloud-plume image straddles the seam into section two, a saturated red panel holding a centered monogram, an uppercase mission line, a large script signature, two closing lines of copy, and a second looping video with a soft fade into the red. Motion is a staggered load-in fade on the hero, an IntersectionObserver reveal on the red section's content, and a scroll-linked parallax on the cloud plume — all degrading to a static, fully-visible layout under reduced motion.

ZeroSum-Solutions/mishmash

Full-screen, single-viewport (100vh, no scroll) dark hero landing page for **Asme**, a fictional no-code AI app platform. The fullscreen background is an HLS video stream from Mux, playing natively on Safari and via hls.js MediaSource on other browsers. A liquid-glass pill navbar (luminosity-blended glass with a masked `::before` gradient border) floats above an Instrument Serif hero heading and an animated email-capture CTA — "Get early access" expands to a form with a 60 ms/char typewriter placeholder, flips `ArrowRight` to `Check` on submit, and auto-resets after 4 seconds. All elements animate in on load with Motion (Framer Motion).

ZeroSum-Solutions/mishmash

A pixel-spec, dark-themed single-page marketing landing site for **Asme**, a fictional knowledge and insights platform, featuring a signature reusable `.liquid-glass` surface treatment — luminosity-blended translucent fill, 4px backdrop blur, inset top highlight, and a masked `::before` gradient border — applied consistently across the navbar pill, email capture, buttons, cards, and icon chips. The full-viewport hero loops a locally vendored `.mp4` video via a vanilla `requestAnimationFrame` opacity crossfade (fade in on `canplay`, fade out at 0.55s remaining, 100ms gap restart). Four scroll-triggered sections animate in with Framer Motion `useInView`: About, Featured Video, Innovation × Vision (video + two columns sliding from opposite sides), and Services (two glass cards with hover-zoom video). Instrument Serif display type sits against pure black throughout.

ZeroSum-Solutions/mishmash

A premium, dark-cinematic landing page for **Aura**, a fictional AI-native email client, featuring a looping fullscreen background video, a gradient-clip shiny headline, a macOS-style menu bar mockup, a realistic inbox preview, and a custom liquid-glass card treatment. The multi-section layout covers navbar, hero, menu bar, inbox mockup, feature triage, logo cloud, testimonials, pricing, and a final CTA — targeting the AI productivity app and SaaS landing page use case.

ZeroSum-Solutions/mishmash

A modern React landing page for a fictional broadcast-grade live video platform featuring a full-screen adaptive HLS video background, a glassmorphic navigation header, and hero content pinned to the bottom-left corner. Dark cinematic aesthetic with Gloock display serif, Archivo body, JetBrains Mono telemetry labels, and an aurora-green signal accent — ideal as a live streaming platform or video SaaS landing page template.

ZeroSum-Solutions/mishmash

A single-screen marketing landing page for "dot.", a calm-messaging product that links you with one anonymous peer for a single message each day. The hero is a full-screen looping background video of a phone, fronted by an animated Instrument Serif headline and a typewriter effect that types and deletes short messages ("Are you here?", "Yes, I am.", "Speak soon.") positioned to sit on the phone's on-screen display — evoking a quiet, analog rhythm. A floating pill navbar with a glinting "Link up" CTA completes the single-screen composition.

ZeroSum-Solutions/mishmash

A single-page "scrollytelling" landing page called Step Into Wonder: a 4.8-screen pinned scroll sequence where painted curtains part over a glowing crystal-cave portal, the world zooms and the portal irises open toward a sky beyond, then a giant arc of nine pastel destination cards sweeps across the closing scroll like a slow ferris wheel. Serif display headlines (Viaoda Libre) pair with a plain sans body face (Imprima) over a near-black stage, with mouse parallax on every layer and a dignified static fallback under reduced motion.

ZeroSum-Solutions/mishmash

Full landing page for the fictional AI workflow-automation platform **FlowMate** — a fixed left sidebar with a logo mark and section nav, a translucent blurred navbar, a large serif hero headline, a liquid-glass chat-composer card overlaid on a looping ambient video, a six-card feature grid, and an auto-rotating three-up cards carousel, all on an off-white minimalist palette with one indigo-violet chromatic accent.

ZeroSum-Solutions/mishmash

A single-page landing page for GroundAI, an interior-design AI product, built with TanStack Start v1 on file-based routing, React 19, TypeScript, Tailwind CSS v4, framer-motion for all animation, and lucide-react for icons. The page is composed of four stacked sections: a full-bleed autoplaying video hero with spring-animated header, expanding glass nav pill, and word-by-word animated description; a CSS marquee of partner brand wordmarks; a CraftExperiences section with a spring-driven style carousel, a skeleton-morphing chat card, and a staggered adaptable list; and a two-column testimonials block with animated word reveals.

ZeroSum-Solutions/mishmash

Produce a print-grade single-page kami (紙 / 纸) document — warm parchment canvas, ink-blue accent, serif at one weight, no italic, no cool grays. The output reads like a professional white paper or studio one-pager, not an app UI. Multilingual by design (EN · zh-CN · ja). One self-contained HTML file, zero dependencies.

ZeroSum-Solutions/mishmash

A single-page, desktop-only dark hero landing for the fictional studio **Kubric™**, built on **TanStack Start v1 + React 19 + Vite 7 + Tailwind v4** with file-based routing. Features a looping background video with a progressive 8-layer `backdrop-filter` blur at the bottom, an animated SVG logo with arc stroke-dashoffset reveals, a glass nav pill, a character-by-character headline reveal, a vertical right-side section nav, and a white "About us" card. Everything animates in on first load once the background video is ready.

ZeroSum-Solutions/mishmash

ProFolioX is a static reproduction of the current Lexington Themes portfolio template. It combines a fixed desktop sidebar, responsive mobile navigation, Geist typography, light and dark themes, animated project cards, searchable content, and editorial portfolio layouts.

ZeroSum-Solutions/mishmash

Warm, editorial single-page landing for **Velar.**, a fictional luxury real-estate brand. A deep-teal typewriter preloader gives way to a sky-backdrop hero ("Live in Irreplaceable") with a cutout building image that rises from below on load, then a scroll-driven centerpiece: as the user scrolls, that same building drifts upward and scales to 1.45x while pinning toward the bottom of a sticky black statement section with count-up stats. A hover-expand five-tile video gallery slides up over the statement section, and a bronze-gradient "Inquire" close finishes the page. Syne (display) pairs with Inter (body) throughout, on a warm off-white ground with one chromatic bronze accent.

ZeroSum-Solutions/mishmash

A full-screen, cinematic hero landing page for a creative agency called Mainframe, featuring a fixed background video that scrubs forward and backward in response to horizontal mouse movement, an AI-assistant-themed blurred intro label, a typewriter-animated headline, and a row of pill-shaped action buttons with a clipboard copy email link. The design pairs HelveticaNowDisplay-Medium headings with HelveticaNowDisplayW01-Rg body text, both vendored locally for offline use. Built with React 19, TypeScript, Vite, and Tailwind CSS v3.

ZeroSum-Solutions/mishmash

A cinematic, single-section landing hero for mėntality, a fictional mental-health resources product. The page pairs a full-bleed background video that gradient-masks into a soft `#edeef5` base with a glassmorphic, fixed navigation bar, built in React 19 + Vite and animated with Motion (formerly Framer Motion). Notable techniques include `backdrop-blur` glassmorphism, a gradient mask that blends the video top into the base color, `clamp()` fluid headline sizing, an animated SVG hamburger that morphs into an X, an inline blinking "eye/pupil" pill in the headline, and an animated `pl`/`en` language toggle. Styling is Tailwind CSS 4 via the `@tailwindcss/vite` plugin (CSS-first `@theme`, no config file), with Inter and Outfit from Google Fonts.

ZeroSum-Solutions/mishmash

A pure-black (#000) monochrome landing page for Mindloop, a newsletter and content platform, where white typography does the talking — Inter for structure and Instrument Serif italics for accent words. The seven-section page flows through a fixed glass navbar, a full-viewport MP4 hero with email capture, an AI-platform awareness section, a scroll-driven word-by-word opacity reveal, a solution feature grid with a 3:1 video panel, an HLS-streamed CTA section via hls.js (with native Safari fallback), and a minimal footer — with Framer Motion entrances and a liquid-glass CSS border effect throughout.

ZeroSum-Solutions/mishmash

Cinematic single-page landing for the fictional neural-AI platform **SynapseX**. A fixed, full-viewport background video scrubs frame-by-frame as the page scrolls and progressively blurs, sitting behind a scramble-in split-corner hero headline, a 3D-tilted cinematic paragraph reveal, and a frosted-glass horizontal metrics carousel. Pure black-and-white scaffolding is punctuated by one neon-green "synaptic" accent that ties the UI to the glowing footage underneath it.

ZeroSum-Solutions/mishmash

A dark, full-bleed landing page for Neuralyn, a fictional analytics-dashboard SaaS, featuring a full-viewport hero with a scroll-linked parallax dashboard composited over a looping background video and a scroll-driven testimonial where each word lights up as you scroll. The aesthetic is pure-black background, white type, a single italic serif accent word, and a liquid-glass tag pill. Built with React 18 + Vite and TypeScript, styled with Tailwind CSS 3 and shadcn/ui-style primitives, animated via Framer Motion (`useScroll`/`useTransform`) for scroll-linked parallax and the word-by-word color reveal, with fonts self-hosted via Fontsource.

ZeroSum-Solutions/mishmash

A monochrome, editorial landing page for a fictional Natural History Museum paleontology collection, featuring a three-section continuous scroll: a full-viewport hero with a delayed background video reveal and an animated geometric "NHM" SVG logotype (per-polygon slide-up reveal), an "Explore Our World" section with scroll-revealed display heading and action pills, and a dark "Ancient Collection" chapter browser with auto-cycling fossil images and a custom SVG `feTurbulence`/`feDisplacementMap` sand-dissolve transition effect. Built with React 19, Vite 6, Tailwind CSS 4 (CSS-first config), and Motion (Framer Motion), in a strictly monochrome black/white/gray palette — no color accents.

ZeroSum-Solutions/mishmash

A single-page NFT landing site with four full-bleed sections (Hero, About, Collection, CTA) on a dark space theme. The page uses looping muted background videos, a CSS liquid-glass UI effect, a fixed grain texture overlay, and a tight color system (deep navy `#010828`, off-white `#EFF4FF`, neon green `#6FFF00`; Anton headings, Condiment cursive accents, system mono body). Showcases a three-card NFT collection grid with rarity scores and video previews.

相关技能