Shape Landing Hero — アニメーション幾何学形状ヒーローコンポーネント
MIT ライセンスの
pulkitxm/claude-directoryギャラリーからベンダリングされたヒーローセクション
Kokonut UI の HeroGeometric コンポーネントの統合版です。Framer Motion により、5つのぼかしとグラデーションが施された形状が、ほぼ黒 (#030303) のキャンバス上でグラデーションクリップされた見出しの背後に漂います。このコンポーネントは shadcn/ui の適切なプロジェクト構造に配置され、ランディング体験(フローティングナビゲーションバー、CTA、ライブプロップスプレイグラウンド、機能グリッド、インストールバンド)でラップされ、ファーストビューに表示されます。このアニメーションヒーローセクションは、ダークテーマのSaaS、デザインツール、ポートフォリオのランディングページに最適な出発点です。
ワークフロー
example.htmlをユーザーのワークスペースにクローンし、作業ファイルとします。- プレースホルダーコンテンツをユーザーの実際のブランド名、見出し、 本文、数値、画像に置き換えます。アセットを差し替える際は、既存の画像サイズに合わせてください。
- デザインシステムを維持します。 以下のビルド仕様書に記載されているパレット、タイプスケール、スペーシングのリズム、モーションはアイデンティティです。フォントを置き換えたり、パレットの色を変更したり、装飾要素を取り除いたりしないでください。
- セクションを複製して拡張します。 他のテンプレートからレイアウトをインポートしないでください。セクションが不足している場合は、このテンプレート独自の表現でゼロからデザインしてください。
- モーションをアクセシブルに保ちます。 ビルド仕様書で要求されているように、すべてのアニメーションは
prefers-reduced-motionの背後に配置する必要があります。
出力契約
<artifact> タグの間に出力します:
<artifact identifier="shape-landing-hero" type="text/html" title="Shape Landing Hero — Animated Geometric Shapes Hero Component">
<!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">
Crafting exceptional digital experiences through
innovative design and cutting-edge technology.
</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
実装ガイドライン
- コンポーネントの構造を分析し、必要な依存関係をすべて特定します。
- コンポーネントの引数と状態を確認します。
- 必要なコンテキストプロバイダーやフックを特定し、それらをインストールします。
- 質問事項
- このコンポーネントに渡されるデータ/プロップスは何ですか?
- 特定の状態管理要件はありますか?
- 必要なアセット(画像、アイコンなど)はありますか?
- 期待されるレスポンシブ動作はどのようなものですか?
- アプリ内でこのコンポーネントを使用する最適な場所はどこですか?
統合手順
- 上記のコードをすべて正しいディレクトリにコピーペーストします。
- 外部依存関係をインストールします。
- 画像アセットには、存在が確認されている Unsplash のストック画像を使用します。
- SVG やロゴが必要な場合は、lucide-react のアイコンを使用します。
ソースとライセンス
MIT ライセンスの pulkitxm/claude-directory からベンダリングされています。
上流の MIT ライセンステキストは、このテンプレートの LICENSE に含まれており、example.html または assets/ のコピーとともに再配布する必要があります。
Web フォントおよびフル解像度の画像はベンダリングされていません。ローカルの @font-face ルールは Google Fonts CDN から提供され、参照画像はダウンスケールされています。元のアセットについては、上流のフォルダを取得してください。