mėntality — 映画的なメンタルヘルスヒーローランディングページ
MITライセンスの
pulkitxm/claude-directoryギャラリーからベンダリングされたランディングページ。
架空のメンタルヘルスリソース製品「mėntality」のための、映画的な1セクション・ランディングヒーローページ。ページは、グラデーションマスクで柔らかな #edeef5 ベースにブレンドされる全画面背景ビデオと、ガラスモーフィズムの固定ナビゲーションバーを備え、React 19 + Viteで構築され、Motion(旧Framer Motion)でアニメーション化されています。特筆すべき技術として、backdrop-blur ガラスモーフィズム、ビデオ上部をベースカラーにブレンドするグラデーションマスク、clamp() による流動的な見出しサイズ、モーフィングしてXに変形するアニメーションSVGハンバーガー、見出し内のインラインで点滅する「目/瞳孔」ピル、アニメーションする pl/en 言語切り替えなどがあります。スタイリングは、@tailwindcss/vite プラグイン(CSSファーストの @theme、設定ファイルなし)を介したTailwind CSS 4であり、Google FontsからInterとOutfitを使用しています。
ワークフロー
example.htmlをクローンし、ユーザーのワークスペースに作業ファイルとして配置します。- プレースホルダーコンテンツを置き換え、ユーザーの実際のブランド名、見出し、本文コピー、数字、画像に差し替えます。アセットを交換する際は、既存の画像寸法に合わせてください。
- デザインシステムを維持します。 以下のビルド仕様にあるパレット、タイプスケール、スペーシングリズム、モーションはアイデンティティです — フォントを代替したり、パレットの色を変更したり、装飾要素を削除したりしないでください。
- セクションを複製して拡張し、他のテンプレートからレイアウトをインポートしないでください。セクションが不足している場合は、このテンプレート独自のボキャブラリーでゼロからデザインしてください。
- モーションをアクセシブルに保ちます。 すべてのアニメーションは、ビルド仕様で要求されているように、
prefers-reduced-motionの背後に留めてください。
出力契約
以下の内容を <artifact> タグで囲んで出力します:
<artifact identifier="mentality-landing" type="text/html" title="mėntality — 映画的なメンタルヘルスヒーローランディングページ">
<!doctype html>
<html>...</html>
</artifact>
ビルド仕様
このデザインを生み出した元のプロンプトを、そのまま転記します。
mėntality — 映画的なメンタルヘルスランディングヒーロー
概要
Vite、Tailwind CSS、Motion(Motion/React)を使用してエレガントなアニメーションを備えた、モダンで高度に磨き上げられたReactランディングページを構築します。このページは、全画面背景ビデオが軟らかい #edeef5 ベースにシームレスにブレンドされ、その上にガラスモーフィックなナビゲーションバーが配置された、美的なヒーローセクションを中心としています。ブランドは「mėntality」、メンタルヘルスリソース製品です。
技術スタック
- フレームワーク: React 19(
react^19.1.0、react-dom^19.1.0)とStrictMode。 - ビルドツール: Vite
^6.3.5と@vitejs/plugin-react^4.5.2。 - スタイリング: Tailwind CSS
^4.1.10(@tailwindcss/vite^4.1.10プラグイン経由、CSSファーストの@theme設定 —tailwind.config.jsは不要)。 - アニメーション: Motion
^12.18.1(motion/reactからインポート —motion、AnimatePresence)。 - 言語/型: TypeScript
^5.8.3、@types/react^19.1.8、@types/react-dom^19.1.6。 - フォント: Google Fonts からの Inter(サンセリフ/本文)と Outfit(表示用)。
- 特筆すべき技術: ガラスモーフィズム(
backdrop-blur)、ビデオをベースカラーにブレンドするグラデーションマスク、clamp()による流動的な見出しサイズ、アニメーションするSVGハンバーガー、点滅するインラインの「目/瞳孔」ピル、アニメーションする言語切り替え。 - 開発依存関係に関する注意: ツール/テスト用に
playwright-core^1.60.0が存在します。
グローバル設定
package.json スクリプト
{
"scripts": {
"dev": "vite",
"build": "tsc --noEmit && vite build",
"preview": "vite preview"
}
}
index.html
<html lang="en">、UTF-8、レスポンシブビューポートメタ。- メタディスクリプション:
mėntality — information and resources to help you manage your mental wellbeing. - タイトル:
mėntality — mental health tools。 - ファビコンは、4つの円で構成されたクローバーマーク(塗りつぶし
#1a1a1a)のインラインSVGデータURI:
<link
rel="icon"
type="image/svg+xml"
href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%231a1a1a'%3E%3Ccircle cx='12' cy='7.2' r='4.8'/%3E%3Ccircle cx='12' cy='16.8' r='4.8'/%3E%3Ccircle cx='7.2' cy='12' r='4.8'/%3E%3Ccircle cx='16.8' cy='12' r='4.8'/%3E%3C/g%3E%3C/svg%3E"
/>
<div id="root"></div>をマウントし、<script type="module" src="/src/main.tsx"></script>を読み込みます。
エントリポイント — src/main.tsx
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import "./index.css";
import App from "./App";
createRoot(document.getElementById("root")!).render(
<StrictMode>
<App />
</StrictMode>,
);
タイポグラフィとグローバルCSS — src/index.css
- Google FontsからInterとOutfitをインポートし、その後Tailwindをインポート:
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@300;400;500;600;700&display=swap");
@import "tailwindcss";
@themeを介してテーマトークンを定義します。--font-sansを Inter に、--font-displayを Outfit に設定します。--color-brand-greenを#9fff00に、--color-bg-baseを厳密に#edeef5に設定:
@theme {
--font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
--font-display: "Outfit", ui-sans-serif, system-ui, sans-serif;
--color-brand-green: #9fff00;
--color-bg-base: #edeef5;
}
- ベース背景を
bodyに適用し、#edeef5カラーがページ全体に行き渡るようにします:
@layer base {
body {
@apply bg-bg-base text-zinc-900 font-sans antialiased;
}
}
コンポーネント構造 — src/App.tsx
Navbar と Hero をインポートし、<Navbar /> と <main><Hero /></main> を含むラッパー div を返します。ラッパーは min-h-screen bg-bg-base selection:bg-brand-green selection:text-black クラスを持ちます。
import Navbar from "./components/Navbar";
import Hero from "./components/Hero";
export default function App() {
return (
<div className="min-h-screen bg-bg-base selection:bg-brand-green selection:text-black">
<Navbar />
<main>
<Hero />
</main>
</div>
);
}
ナビゲーションバー — src/components/Navbar.tsx
半透明の明るいグレーから透明度へとフェードする、固定されたガラスモーフィックなヘッダー。
コンテナとレイアウト
<header>スタイリング:fixed top-0 left-0 w-full z-50 py-6 md:py-10 bg-gradient-to-b from-[#f1f1f1]/80 to-transparent backdrop-blur-[2px]。- 内部の
<nav aria-label="Primary">は12カラムグリッド:grid grid-cols-12 max-w-7xl mx-auto items-center gap-x-4 md:gap-x-8 px-8 md:px-16 lg:px-20。
左 — ブランド(カラム1〜3)
- ブランドリンク
<a href="#">:col-span-6 md:col-span-3 flex items-center gap-2.5 group、aria-label="mėntality — home"。 - ブランド名
mėntalityの横に、表示フォントで設定された幾何学的な花/クローバーSVGアイコン。 - ブランドワードマークのspan:
font-display text-xl md:text-2xl font-medium tracking-tight text-[#1a1a1a]で、テキストはmėntality。
クローバーアイコンは、#1a1a1a で塗りつぶされた4つの重なり合う円として描かれ、ホバー時に回転する再利用可能なコンポーネント:
function CloverIcon({ className = "w-6 h-6" }: { className?: string }) {
return (
<svg viewBox="0 0 24 24" className={className} aria-hidden="true">
<g fill="#1a1a1a">
<circle cx="12" cy="7.1" r="4.9" />
<circle cx="12" cy="16.9" r="4.9" />
<circle cx="7.1" cy="12" r="4.9" />
<circle cx="16.9" cy="12" r="4.9" />
</g>
</svg>
);
}
- アイコンインスタンスのクラス:
w-6 h-6 md:w-7 md:h-7 transition-transform duration-500 ease-out group-hover:rotate-90。
中央 — デスクトップリンク(カラム4〜9)
- 定数として一度定義:
const NAV_LINKS = ["service", "patient resources", "about us", "education center"]; <ul>でレンダリング:hidden md:flex col-span-6 items-center justify-center gap-6 lg:gap-9(デスクトップのみ、モバイルでは非表示)。- 各リンク
<a href="#">:text-[13px] lowercase tracking-wide text-zinc-600 hover:text-[#1a1a1a] transition-colors duration-200 whitespace-nowrap。 - リンクラベル(小文字): "service"、"patient resources"、"about us"、"education center"。
右 — アクション(カラム10〜12)
- コンテナ:
col-span-6 md:col-span-3 flex items-center justify-end gap-4 lg:gap-6。 - 「find help」アンカリンク(デスクトップのみ):
hidden md:inline-block text-[13px] lowercase tracking-wide text-zinc-600 hover:text-[#1a1a1a] transition-colors duration-200 whitespace-nowrap。 - 黒の角丸「get started」ボタン(アンカー):
hidden sm:inline-flex items-center gap-2 bg-[#1a1a1a] text-white text-[13px] lowercase tracking-wide rounded-full pl-5 pr-4 py-2.5 transition-all duration-300 hover:bg-black hover:gap-3 whitespace-nowrap。テキストはget startedの後に→(→)矢印のspan(aria-hidden="true")。 - モバイル用のエレガントなアニメーションするハンバーガートグルボタン。
アニメーションするハンバーガートグル
- 状態:
const [open, setOpen] = useState(false); <button type="button">:onClick={() => setOpen((v) => !v)}、aria-expanded={open}、aria-controls="mobile-drawer"、aria-label={open ? "メニューを閉じる" : "メニューを開く"}、クラスmd:hidden relative w-10 h-10 -mr-2 flex flex-col items-center justify-center gap-[7px]。- 2つの
motion.spanバー、それぞれblock w-6 h-[2px] bg-[#1a1a1a] rounded-full origin-center:- 上のバーは
open ? { rotate: 45, y: 4.5 } : { rotate: 0, y: 0 }とアニメーション。 - 下のバーは
open ? { rotate: -45, y: -4.5 } : { rotate: 0, y: 0 }とアニメーション。 - 両方とも
transition={{ duration: 0.3, ease: [0.32, 0.72, 0, 1] }}を使用。
- 上のバーは
モバイルドロワー
AnimatePresence でラップされ、open が true のときにレンダリングされます。
motion.div id="mobile-drawer":initial={{ opacity: 0, y: -16 }}、animate={{ opacity: 1, y: 0 }}、exit={{ opacity: 0, y: -16 }}、transition={{ duration: 0.35, ease: [0.32, 0.72, 0, 1] }}、クラスmd:hidden absolute top-full left-0 w-full px-4。- 内側のパネル
div:rounded-2xl bg-white/95 backdrop-blur-2xl border border-white/60 shadow-[0_24px_48px_-16px_rgba(26,26,26,0.18)] p-6。 [...NAV_LINKS, "find help"]を繰り返す<ul className="flex flex-col">。各項目はmotion.liで、initial={{ opacity: 0, x: -10 }}、animate={{ opacity: 1, x: 0 }}、transition={{ delay: 0.06 * i + 0.08, duration: 0.3 }}、クラスborder-b border-black/[0.06] last:border-none。各項目は<a href="#">(クリックでドロワーを閉じる)を含み、クラスはblock py-3.5 font-display text-lg lowercase text-[#1a1a1a]。- 末尾の
motion.a「get started」CTA:initial={{ opacity: 0, y: 8 }}、animate={{ opacity: 1, y: 0 }}、transition={{ delay: 0.4, duration: 0.3 }}、クラスmt-5 flex items-center justify-center gap-2 bg-[#1a1a1a] text-white text-sm lowercase tracking-wide rounded-full py-3.5。テキストはget startedの後に→(→)span(aria-hidden="true")。クリックでドロワーを閉じます。
ヒーロー — src/components/Hero.tsx
セクションシェル
<section className="relative min-h-[110vh] sm:min-h-[140vh] w-full flex flex-col items-center justify-start overflow-hidden bg-bg-base">
ビデオの下に人為的なマージンやパディングがないことを確認し、ビデオがヒーロービューポートの正確に100%を占め、#edeef5 ベースがページ全体をきれいにアンカーするようにします。
背景ビデオコンテナ
-
絶対配置ラッパー:
absolute top-[15vh] sm:top-[20vh] left-0 w-full h-[95vh] sm:h-[120vh] z-0 pointer-events-none。 -
ビデオ要素:
<video autoPlay loop muted playsInline src={VIDEO_SRC} className="w-full h-full object-cover opacity-100" />。 -
ビデオソース: アセットはローカルにベンダリングされ、以下を介して参照:
const VIDEO_SRC = "/assets/hf_20260603_132049_036591b8-6e92-4760-b94c-a7ea6eef315c.mp4";これは元々、CloudFront URL
https://d8j0ntlcm91z4.cloudfront.net/user_38xzzbokvigwjottwixh07lwa1p/hf_20260603_132049_036591b8-6e92-4760-b94c-a7ea6eef315c.mp4から取得されました。(ホスト/スキームは小文字化されています。パスは元のプロンプトからそのまま転記されており、元のプロンプトはすべて大文字でした — ローカルにベンダリングされたファイルが実際のランタイムソースです。) -
グラデーションマスク: ラッパー内で、ビデオの下に、
<div className="absolute top-0 left-0 w-full h-24 sm:h-32 bg-gradient-to-b from-bg-base to-transparent"></div>を追加して、ビデオの上部を#edeef5背景に滑らかにブレンドします。
ヒーローコンテンツの配置
- コンテンツグリッドラッパー:
max-w-7xl w-full mx-auto px-8 md:px-16 lg:px-20 relative z-10 grid grid-cols-12 gap-x-4 md:gap-x-8 pt-28 sm:pt-32 md:pt-44。 - テキストカラム:
col-span-12 md:col-span-10 md:col-start-2。
ヒーローヘッダー(motion.h1)
- アニメーション:
initial={{ opacity: 0, y: 15 }}、animate={{ opacity: 1, y: 0 }}、transition={{ duration: 0.8 }}(スライドアップフェード)。 - クラス:
font-display font-medium tracking-[-0.02em] text-[clamp(30px,4.3vw,56px)] leading-[1.12]。 - 正確なテキストフォーマット(セグメントごとの色と改行を含む):
[#1a1a1a]— "Remix: Mentality offers"[#8e8e8e]— "information"- (改行)
[#8e8e8e]— "and resources to help you manage"- (改行)
[#8e8e8e]— "your"<EyePill />"mental wellbeing."
<motion.h1 /* … */ className="font-display font-medium tracking-[-0.02em] text-[clamp(30px,4.3vw,56px)] leading-[1.12]">
<span className="text-[#1a1a1a]">Remix: Mentality offers</span>{" "}
<span className="text-[#8e8e8e]">information</span>
<br />
<span className="text-[#8e8e8e]">
and resources to help you manage
</span>
<br />
<span className="text-[#8e8e8e]">
your <EyePill /> mental wellbeing.
</span>
</motion.h1>
EyePill — インライン「瞳孔」要素
「your」と「mental」の間に、インラインのピル型ビジュアルをレンダリングします。点滅する、丸みを帯びたボーダー付きカプセルで、小さな無地の黒いドットを含みます。
function EyePill() {
return (
<span className="w-[16px] md:w-[42px] lg:w-[62px] h-[16px] md:h-[26px] lg:h-[34px] border-[2px] border-[#1a1a1a] rounded-full inline-flex items-center justify-center align-middle mx-1 md:mx-2 overflow-hidden">
<motion.span
aria-hidden="true"
animate={{ scaleY: [1, 1, 0.12, 1] }}
transition={{
duration: 3.4,
times: [0, 0.9, 0.95, 1],
repeat: Infinity,
…
[翻訳のために切り詰められました]