mėntality — 시네마틱 정신 건강 히어로 랜딩 페이지
MIT 라이선스
pulkitxm/claude-directory갤러리에서 가져온 랜딩 페이지.
mėntality라는 가상의 정신 건강 리소스 제품을 위한 시네마틱 단일 섹션 랜딩 히어로 페이지입니다. 이 페이지는 부드러운 #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) withStrictMode. - 빌드 도구:
@vitejs/plugin-react^4.5.2를 사용하는 Vite^6.3.5. - 스타일링:
@tailwindcss/vite^4.1.10플러그인을 통한 Tailwind CSS^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 — 정보와 리소스를 제공하여 정신 건강 관리에 도움을 줍니다. - 제목:
mėntality — 정신 건강 도구. - 파비콘은 네 개의 원으로 이루어진 클로버 마크(채우기
#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 — 홈".- 디스플레이 글꼴로 설정된 브랜드명
mėntality옆의 기하학적 꽃/클로버 SVG 아이콘. - 브랜드 워드마크 span:
font-display text-xl md:text-2xl font-medium tracking-tight text-[#1a1a1a]텍스트mėntality.
클로버 아이콘은 #1a1a1a로 채워진 네 개의 겹치는 원으로 그려지는 재사용 가능한 컴포넌트이며, 호버 회전이 있습니다:
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">withonClick={() => 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].- 두 개의
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"withinitial={{ 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,
…
[번역을 위해 잘림]