Asme — シネマティックダークヒーローランディングページ
MITライセンス
pulkitxm/claude-directoryギャラリーから取り込んだランディングページ。
全画面、シングルビューポート(100vh、スクロールなし)のダークヒーローランディングページ。Asme という架空のノーコードAIアプリプラットフォーム向け。背景はMuxのHLSビデオストリームで、Safariではネイティブ、その他のブラウザではhls.js MediaSourceで再生。リキッドガラス調のピル型ナビゲーションバー(輝度ブレンドガラスにマスクされた::beforeグラデーションボーダー)が、Instrument Serifのヒーロー見出しとアニメーション化されたメールキャプチャCTAの上に浮かんでいます。「Get early access」ボタンをクリックすると、60 ms/文字のタイプライター風プレースホルダー付きフォームが展開され、送信時にArrowRightアイコンがCheckに変わり、4秒後に自動リセットされます。すべての要素はMotion (Framer Motion) で読み込み時にアニメーション表示されます。
ワークフロー
example.htmlをユーザーのワークスペースに複製し、作業ファイルとします。- プレースホルダーコンテンツを、ユーザーの実際のブランド名、見出し、本文、数値、画像に置き換えます。アセットを交換する際は、既存の画像の寸法に合わせてください。
- デザインシステムを維持します。 以下のビルド仕様にあるパレット、タイプスケール、スペーシングリズム、モーションはアイデンティティです。フォントを変更したり、パレットの色を変更したり、装飾要素を削除したりしないでください。
- セクションを複製して拡張します。 他のテンプレートからレイアウトをインポートしないでください。セクションが不足している場合は、このテンプレート独自の表現でゼロからデザインしてください。
- モーションをアクセシブルに保ちます。 ビルド仕様で要求されているとおり、すべてのアニメーションは
prefers-reduced-motionの設定に従う必要があります。
出力契約
<artifact> タグで囲んで出力します:
<artifact identifier="asme-hero-landing" type="text/html" title="Asme — シネマティックダークヒーローランディングページ">
<!doctype html>
<html>...</html>
</artifact>
ビルド仕様
このデザインを生成した元のプロンプトをそのまま記載します。
Asme — シネマティックダークヒーローランディングページ
概要
「Asme」のための、全画面、ダーク、シングルスクリーン(100vh、スクロールなし)のヒーローランディングページを構築します。ページは黒い背景で、全画面のループする背景ビデオ、グラスモーフィズムのナビゲーションバー、中央寄せのヒーローセクション(アニメーション化されたメールキャプチャCTA付き)を持ちます。見出しにはエレガントなセリフ体ディスプレイフォントを使用し、ほとんどの要素はMotionで読み込み時にアニメーション表示されます。
技術スタック
- フレームワーク: React 19(
react^19.2.7、react-dom^19.2.7)、Vite(vite^8.0.16)、@vitejs/plugin-react^6.0.2を使用。 - スタイリング: Tailwind CSS v4(
tailwindcss^4.3.0)、@tailwindcss/vite^4.3.0を介して統合(@import "tailwindcss";+@themeアプローチ、tailwind.config.jsは不使用)。 - アニメーション: Motion (Framer Motion)
motion^12.40.0、motion/reactからインポート(motion、AnimatePresence)。 - アイコン: Lucide(
lucide-react^1.17.0)—Globe、ArrowRight、Check。 - ビデオ: HLS.js(
hls.js^1.6.16)によるHLS再生、Safari向けネイティブHLSフォールバック。 - フォント: Inter(ベースサンセリフ体)および Instrument Serif(ヒーロー見出し)、Google Fontsから読み込み。
- 注目すべき技術: マスクされたグラデーションボーダー付きグラスモーフィズム、グラデーションでクリップされたテキスト、タイプライター風プレースホルダー効果、ボタンとメールフォーム間の
AnimatePresenceによる状態切り替え。
グローバル設定
エントリーHTML(index.html)
-
<html lang="en">、<meta charset="UTF-8" />、<meta name="viewport" content="width=device-width, initial-scale=1.0" />。 -
<title>:Asme — A new way to think and create with computers -
<meta name="description" content="Build a no-code AI app in minutes. Get early access to Asme." /> -
ファビコンは白い地球儀アイコンのインラインSVGデータURI:
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20'/%3E%3Cpath d='M2 12h20'/%3E%3C/svg%3E" /> -
Bodyには
<div id="root"></div>と<script type="module" src="/src/main.jsx"></script>を含めます。
Reactエントリーポイント(src/main.jsx)
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import "./index.css";
import App from "./App.jsx";
createRoot(document.getElementById("root")).render(
<StrictMode>
<App />
</StrictMode>,
);
スタイル(src/index.css)
インポート順:最初に両方のGoogle Fonts URL、次にTailwind、最後にテーマ/ベースルール。
-
フォント(Google Fonts):
- Inter、ウェイト300、400、500、600 — ベースサンセリフフォント。
- Instrument Serif、レギュラーおよびイタリック — ヒーロー見出しに使用。
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap"); @import "tailwindcss"; -
テーマ:
@theme { --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif; } -
ルート変数とbody:
:root { --background: #000000; --foreground: #ffffff; } body { background-color: var(--background); color: var(--foreground); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; letter-spacing: -0.01em; } -
.liquid-glass—::beforeでマスクされたグラデーションボーダーを持つグラスモーフィズム面:.liquid-glass { background: rgba(255, 255, 255, 0.01); background-blend-mode: luminosity; /* プリフィックスを先に記述:LightningCSSがminification時にペアをマージした後、標準プロパティが優先されるようにする */ -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); border: none; box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1); position: relative; overflow: hidden; } .liquid-glass::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.4px; background: linear-gradient( 180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.15) 20%, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, 0.15) 80%, rgba(255, 255, 255, 0.45) 100% ); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask-composite: exclude; pointer-events: none; } -
.glass-pill— ピル型のガラス面(完全性のために定義):.glass-pill { background: rgba(255, 255, 255, 0.04); -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%); border-radius: 9999px; box-shadow: none !important; }
アプリルートレイアウト(src/App.jsx)
<main>にクラスrelative bg-black h-screen w-screen flex flex-col overflow-hidden selection:bg-white selection:text-black shrink-0。- テキスト選択スタイルは白い背景に黒い文字(
selection:bg-white selection:text-black)。 - レンダリング順序:
BackgroundVideo、Navbar、Hero。
import BackgroundVideo from "./components/BackgroundVideo.jsx";
import Navbar from "./components/Navbar.jsx";
import Hero from "./components/Hero.jsx";
export default function App() {
return (
<main className="relative bg-black h-screen w-screen flex flex-col overflow-hidden selection:bg-white selection:text-black shrink-0">
<BackgroundVideo />
<Navbar />
<Hero />
</main>
);
}
背景ビデオ(src/components/BackgroundVideo.jsx)
- 親全体を覆う絶対配置の
<div>をレンダリング:absolute inset-0 overflow-hidden pointer-events-none。 <video>要素を含み、autoPlay、muted、loop、playsInlineの属性と、クラスw-full h-full object-cover opacity-100、およびrefを持つ。- ビデオソースURL(MuxでホストされるHLSストリーム — これはCloudFront URLではなくMuxの
.m3u8ストリームです):https://stream.mux.com/kimF2ha9zLrX64H00UgLGPflCzNtl1T0215MlAmeOztv8.m3u8 - HLS.jsによる再生ロジック:
useEffect内で、ブラウザがネイティブHLSをサポートしている場合(video.canPlayType("application/vnd.apple.mpegurl"))、video.srcを直接設定。そうでない場合、Hls.isSupported()がtrueなら、new Hls()をインスタンス化し、loadSource、attachMediaを呼び出し、クリーンアップでhls.destroy()を実行。.m3u8形式は、Safari以外のブラウザではHLS.jsが必要。
import { useEffect, useRef } from "react";
import Hls from "hls.js";
const VIDEO_SRC =
"https://stream.mux.com/kimF2ha9zLrX64H00UgLGPflCzNtl1T0215MlAmeOztv8.m3u8";
export default function BackgroundVideo() {
const videoRef = useRef(null);
useEffect(() => {
const video = videoRef.current;
if (!video) return undefined;
if (video.canPlayType("application/vnd.apple.mpegurl")) {
video.src = VIDEO_SRC;
return undefined;
}
if (Hls.isSupported()) {
const hls = new Hls();
hls.loadSource(VIDEO_SRC);
hls.attachMedia(video);
return () => hls.destroy();
}
return undefined;
}, []);
return (
<div className="absolute inset-0 overflow-hidden pointer-events-none">
<video
ref={videoRef}
autoPlay
muted
loop
playsInline
className="w-full h-full object-cover opacity-100"
/>
</div>
);
}
ナビゲーションバー(src/components/Navbar.jsx)
motion.navでアニメーション表示:initial={{ y: -20, opacity: 0 }}、animate={{ y: 0, opacity: 1 }}。- 外側の
motion.navクラス:relative z-20 px-6 py-6 w-full。 - 内側のコンテナ:
liquid-glass rounded-full px-6 py-3 flex items-center justify-between max-w-5xl mx-auto。 - 左側(
flex items-center gap-8):- ロゴ: Lucideの
Globeアイコン(w-6 h-6 text-white)+ ブランドテキスト「Asme」(text-white font-semibold text-lg)。flex items-center gap-2ラッパー内。 - ナビリンク: 「Features」、「Pricing」、「About」 —
NAV_LINKS配列として定義しマッピング。モバイルでは非表示(hidden md:flex items-center gap-8 text-white/80 text-sm font-medium)。各<a>はhref={#${link.toLowerCase()}}とクラスhover:text-white transition-colors duration-300を使用。
- ロゴ: Lucideの
- 右側(
flex items-center gap-4):- 「Sign Up」 プレーンテキストボタン:
text-white hover:text-white/80 transition-colors text-sm font-medium cursor-pointer。 - 「Login」 グラスモーフィズムボタン:
liquid-glass rounded-full px-6 py-2 text-sm font-medium text-white hover:opacity-90 transition-opacity cursor-pointer。
- 「Sign Up」 プレーンテキストボタン:
import { motion } from "motion/react";
import { Globe } from "lucide-react";
const NAV_LINKS = ["Features", "Pricing", "About"];
export default function Navbar() {
return (
<motion.nav
initial={{ y: -20, opacity: 0 }}
animate={{ y: 0, opacity: 1 }}
className="relative z-20 px-6 py-6 w-full"
>
<div className="liquid-glass rounded-full px-6 py-3 flex items-center justify-between max-w-5xl mx-auto">
<div className="flex items-center gap-8">
<div className="flex items-center gap-2">
<Globe className="w-6 h-6 text-white" />
<span className="text-white font-semibold text-lg">Asme</span>
</div>
<div className="hidden md:flex items-center gap-8 text-white/80 text-sm font-medium">
{NAV_LINKS.map((link) => (
<a
key={link}
href={`#${link.toLowerCase()}`}
className="hover:text-white transition-colors duration-300"
>
{link}
</a>
))}
</div>
</div>
<div className="flex items-center gap-4">
<button
type="button"
className="text-white hover:text-white/80 transition-colors text-sm font-medium cursor-pointer"
>
Sign Up
</button>
<button
type="button"
className="liquid-glass rounded-full px-6 py-2 text-sm font-medium text-white hover:opacity-90 transition-opacity cursor-pointer"
>
Login
</button>
</div>
</div>
</motion.nav>
);
}
ヒーローセクション(src/components/Hero.jsx)
レイアウト
<section>にrelative flex-1 flex flex-col items-center justify-center px-6。- コンテンツラッパー:
relative z-10 text-center max-w-5xl mx-auto flex flex-col items-center justify-center w-full gap-12。
タグライン(motion.p)
- テキスト:「Build a no-code AI app in minutes」。
- クラス:
text-white/80 text-[10px] md:text-[11px] font-medium tracking-[0.2em] uppercase mb-4。 - アニメーション:
initial={{ opacity: 0, y: 10 }}、animate={{ opacity: 1, y: 0 }}、transition={{ delay: 0.1 }}。
見出し(motion.h1)
- テキスト:「A new way to think and create with computers」。
<br className="hidden md:block" />を「create」の後に挿入(つまりA new way to think and create{" "}の後に<br />、そしてwith computers)。 - フォントはインラインスタイルで設定:
style={{ fontFamily: "'Instrument Serif', serif" }}。 - クラス:
text-4xl md:text-[64px] font-medium tracking-[-0.01em] leading-[1.1] mb-6 bg-gradient-to-b from-white via-white/95 to-white/70 bg-clip-text text-transparent max-w-4xl。 - アニメーション:
initial={{ opacity: 0, y: 20 }}、animate={{ opacity: 1, y: 0 }}、transition={{ duration: 1, ease: [0.16, 1, 0.3, 1] }}。
CTAエリア(motion.div)
-
ラッパークラス:
min-h-[50px] mt-2 w-full flex items-center justify-center。 -
アニメーション:
initial={{ opacity: 0, y: 10 }}、animate={{ opacity: 1, y: 0 }}、transition={{ delay: 0.4 }}。 -
AnimatePresence mode="wait"を使用して2つの状態を切り替え。両方の状態でinitial={{ opacity: 0, scale: 0.95 }}、animate={{ opacity: 1, scale: 1 }}、exit={{ opacity: 0, scale: 0.95 }}、transition={{ duration: 0.2 }}を使用。 -
ボタン状態(
motion.button、key="cta-button"):テキスト「Get early access」。クラスpx-10 py-3 text-[14px] font-medium border border-white/10 rounded-full hover:bg-white hover:text-black transition-colors duration-300 group。子要素としてLucideのArrowRightアイコン(w-4 h-4 group-hover:translate-x-1 transition-transform)をテキストの後に配置。 -
フォーム状態(
motion.div、key="email-form"):ラッパークラスflex items-center gap-3。中身は<input>(type="email"、placeholderは状態管理され、タイプライター効果で1文字ずつ表示)、送信用<button>(type="submit"、クラスはボタン状態と同様)。入力値が空の場合はArrowRightアイコン、送信後はCheckアイコンに切り替え。
タイプライタープレースホルダーとCTAロジック
- 状態:
emailPlaceholder、isSubmitting、isSubmitted、emailValueを状態管理。 - タイプライター効果:
useEffectで、プレースホルダーテキスト「Enter your email」を60ms/文字の速度でsetTimeoutを使って表示。 - 送信時:
emailValueをチェック(空でない場合、または実際の検証)。isSubmittingをtrueに設定 → 送信をシミュレート(800msの遅延) →isSubmittedをtrueに設定 → 4秒後にemailValue、emailPlaceholder、isSubmittedをリセット。 - 状態に応じたアイコン:
isSubmittedがtrueの場合Checkアイコン、そうでなければArrowRightアイコン。
import { useState, useEffect, useRef } from "react";
import { motion, AnimatePresence } from "motion/react";
import { ArrowRight, Check } from "lucide-react";
const PLACEHOLDER_TEXT = "Enter your email";
export default function Hero() {
const [showForm, setShowForm] = useState(false);
const [emailValue, setEmailValue] = useState("");
const [emailPlaceholder, setEmailPlaceholder] = useState("");
const [isSubmitting, setIsSubmitting] = useState(false);
const [isSubmitted, setIsSubmitted] = useState(false);
const inputRef = useRef(null);
useEffect(() => {
if (!showForm) {
setEmailPlaceholder("");
return;
}
let i = 0;
const interval = setInterval(() => {
i++;
setEmailPlaceholder(PLACEHOLDER_TEXT.slice(0, i));
if (i >= PLACEHOLDER_TEXT.length) clearInterval(interval);
}, 60);
return () => clearInterval(interval);
}, [showForm]);
const handleSubmit = async () => {
if (!emailValue.trim() || isSubmitting) return;
setIsSubmitting(true);
await new Promise((resolve) => setTimeout(resolve, 800));
setIsSubmitting(false);
setIsSubmitted(true);
setTimeout(() => {
setIsSubmitted(false);
setShowForm(false);
setEmailValue("");
}, 4000);
};
// ... 残りのJSX
// 注:このコンポーネントの完全な実装は、ビルド仕様の完全版を参照してください。
}
注意: 完全な
Heroコンポーネントには、useEffect、状態管理、および上記のロジックに従った完全なJSXが含まれます。完全な実装については、元のソースコードを参照してください。