Neuralyn — 暗色調分析 SaaS 登陸頁面
登陸頁面取自 MIT 授權的
pulkitxm/claude-directory圖庫。
一個暗色調、滿版出血的 Neuralyn(虛構分析儀表板 SaaS)登陸頁面。包含全視窗英雄區(帶有與滾動連動的視差儀表板,疊加在循環背景影片上)以及一個滾動驅動的見證區(每個字詞會隨著滾動逐一亮起)。採用純黑背景、白色字體、一個斜體襯線強調字詞與液態玻璃標籤膠囊。使用 React 18 + Vite 與 TypeScript 建構,以 Tailwind CSS 3 與 shadcn/ui 風格基本元件樣式化,並透過 Framer Motion(useScroll/useTransform)製作滾動連動視差與逐字顏色揭示動畫,字型則透過 Fontsource 自行託管。
工作流程
- 將
example.html複製到使用者的工作空間作為工作檔案。 - 取代佔位內容,填入使用者實際的品牌名稱、標題、 內文、數字與圖片。替換素材時請保持原有圖片尺寸。
- 保留設計系統。 下方建構規格中的色板、字型階層、間距節奏與 動畫效果是此頁面的識別標誌 — 請勿替換字型、重新調整色板 或移除裝飾元素。
- 透過複製區塊來擴充,切勿從其他範本匯入版面配置。 若缺少某個區塊,請使用此範本自身的設計語言從頭開始設計。
- 保持動畫的可及性。 每個動畫都必須置於
prefers-reduced-motion之後,如建構規格所述。
輸出合約
在 <artifact> 標籤之間輸出:
<artifact identifier="neuralyn-dark-landing" type="text/html" title="Neuralyn — 暗色調分析 SaaS 登陸頁面">
<!doctype html>
<html>...</html>
</artifact>
建構規格
以下是產生此設計的原始提示,逐字呈現。
Neuralyn — 暗色調分析登陸頁面
概觀
為 Neuralyn(一個分析儀表板 SaaS)建立一個暗色調、滿版出血的登陸頁面。頁面包含兩個區塊:一個全視窗英雄區,帶有疊加在循環背景影片上的視差儀表板,以及一個滾動驅動的見證區,其中的每個字詞會隨著滾動逐一亮起。設計美學為純黑背景、白色字體、一個斜體襯線強調字詞,以及一個「液態玻璃」標籤膠囊。
技術棧
- 框架: React 18(
react^18.3.1、react-dom^18.3.1)搭配 Vite(vite^5.4.10、@vitejs/plugin-react^4.3.3) - 語言: TypeScript(
typescript^5.6.3) - 樣式: Tailwind CSS(
tailwindcss^3.4.14)搭配 PostCSS(postcss^8.4.49)與 Autoprefixer(autoprefixer^10.4.20) - 動畫: Framer Motion(
framer-motion^11.11.17)—useScroll、useTransform、motion元件 - 圖示: Lucide(
lucide-react^0.460.0)—ChevronDown - UI 基本元件(shadcn/ui 風格):
@radix-ui/react-slot^1.1.0、class-variance-authority^0.7.0、clsx^2.1.1、tailwind-merge^2.5.4 - 字型(透過 Fontsource 自行託管):
- Inter(
@fontsource/inter^5.1.0)— 字重 400、500、600、700 — 內文/UI - Instrument Serif(
@fontsource/instrument-serif^5.1.0)— 400 與 400 斜體 — 用於斜體強調字詞
- Inter(
- 值得注意的技術: 使用
marginLeft: calc(-50vw + 50%)達到滿版出血w-screen、使用mix-blend-mode: luminosity進行影像合成、滾動連動視差與逐字顏色揭示、透過遮罩偽元素實現 CSS「液態玻璃」邊框。
全域設定
路徑別名
@ 解析到 ./src,需同時設定 vite.config.ts(path.resolve(__dirname, "./src"))與 tsconfig.json("@/*": ["./src/*"])。
進入點(src/main.tsx)
匯入字型 CSS、全域 CSS,然後掛載應用程式:
import React from "react";
import ReactDOM from "react-dom/client";
import "@fontsource/inter/400.css";
import "@fontsource/inter/500.css";
import "@fontsource/inter/600.css";
import "@fontsource/inter/700.css";
import "@fontsource/instrument-serif/400.css";
import "@fontsource/instrument-serif/400-italic.css";
import "./index.css";
import App from "./App";
ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<App />
</React.StrictMode>,
);
應用程式外殼(src/App.tsx)
import Hero from "@/components/Hero";
import Testimonial from "@/components/Testimonial";
export default function App() {
return (
<main>
<Hero />
<Testimonial />
</main>
);
}
HTML 文件(index.html)
<html lang="en">、<meta name="theme-color" content="#000000" />- Favicon:
<link rel="icon" type="image/png" href="/src/assets/logo.png" /> - Meta 描述:"Neuralyn helps teams track metrics, goals, and progress with precision."
- 標題:
Neuralyn — Your Insights. One Clear Overview. - 內嵌樣式避免閃爍:
html { background: #000; }
Tailwind 配置(tailwind.config.ts)
content: ["./index.html", "./src/**/*.{ts,tsx}"]fontFamily.sans:["Inter", "system-ui", "-apple-system", "sans-serif"]fontFamily.serif:["'Instrument Serif'", "Georgia", "serif"]- 顏色透過
hsl(var(--...))對應到 CSS 變數:background、foreground、border、input、ring,以及card、primary、secondary、muted、accent、destructive的DEFAULT/foreground配對。
工具輔助函式(src/lib/utils.ts)
import { clsx, type ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
色彩調色盤
所有顏色均為在 src/index.css 的 :root(預設深色模式)中定義的 HSL CSS 變數:
| 變數 | 值 | 備註 |
|---|---|---|
--background | 0 0% 0% | 純黑色 |
--foreground | 0 0% 100% | 純白色 |
--card | 0 0% 5% | |
--card-foreground | 0 0% 100% | |
--primary | 0 0% 100% | |
--primary-foreground | 0 0% 0% | |
--secondary | 0 0% 10% | |
--secondary-foreground | 0 0% 100% | |
--muted | 0 0% 10% | |
--muted-foreground | 0 0% 65% | |
--accent | 0 0% 10% | |
--accent-foreground | 0 0% 100% | |
--destructive | 0 84% 60% | |
--destructive-foreground | 0 0% 100% | |
--border | 0 0% 20% | |
--input | 0 0% 20% | |
--ring | 0 0% 65% | |
--hero-subtitle | 210 17% 95% | 英雄區副標題顏色 |
基底層(src/index.css)
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
* {
@apply border-border;
}
html {
scroll-behavior: smooth;
}
body {
@apply bg-background font-sans text-foreground antialiased;
}
}
液態玻璃 CSS
新增到 src/index.css。提供一個帶有遮罩漸層邊框的磨砂膠囊:
.liquid-glass {
background: rgba(255, 255, 255, 0.01);
background-blend-mode: luminosity;
backdrop-filter: blur(4px);
-webkit-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-composite: exclude;
pointer-events: none;
}
區塊 1 — 英雄區(src/components/Hero.tsx)
整個區塊為 relative h-screen overflow-hidden(全視窗高度),帶有 data-testid="hero"。一個 sectionRef(useRef<HTMLElement>)驅動滾動連動視差。
滾動設定
const { scrollYProgress } = useScroll({
target: sectionRef,
offset: ["start start", "end start"],
});
const contentY = useTransform(scrollYProgress, [0, 1], [0, -200]);
const contentOpacity = useTransform(scrollYProgress, [0, 0.5], [1, 0]);
const dashboardY = useTransform(scrollYProgress, [0, 1], [0, -250]);
- 英雄區文字內容群組:
y: [0, -200]與opacity: [1, 0](透明度在滾動的前 50% 內淡出)。 - 儀表板圖片:
y: [0, -250]。
導覽列
<header> 為 relative z-40 flex items-center justify-between px-8 py-4 md:px-28。
- 左側群組 —
flex items-center gap-12 md:gap-20:- 標誌連結(
<a href="/">、flex items-center gap-2.5):<img src={logo} alt="Neuralyn logo" className="h-8 w-8" />- 品牌文字:
<span className="text-xl font-bold tracking-tight">Neuralyn</span>
- 導覽(
hidden items-center gap-1 md:flex、aria-label="Main")— 從const NAV_LINKS = ["Home", "Services", "Reviews", "Contact us"];渲染連結。連結在手機上隱藏。每個連結:<a href="#">帶有flex items-center gap-1 rounded-md px-3 py-2 text-sm font-medium text-muted-foreground transition-colors hover:text-foreground。Services 連結會在其標籤後額外渲染一個<ChevronDown className="h-4 w-4" aria-hidden="true" />。
- 標誌連結(
- 右側 — 登入按鈕(shadcn
Button元件):rounded-lg bg-foreground text-sm font-semibold text-background transition-opacity hover:bg-foreground hover:opacity-90。標籤:Sign In。
英雄區內容
一個 motion.div(data-testid="hero-content")設定樣式為 { y: contentY, opacity: contentOpacity } 並加上類別 relative z-20 mt-16 flex flex-col items-center px-4 text-center md:mt-20。依序包含:
- 標籤膠囊 —
motion.div帶有類別liquid-glass mb-6 flex items-center gap-2 rounded-lg px-3 py-2:- 內部的「New」徽章:
<span className="rounded-md bg-white px-2 py-0.5 text-sm font-medium text-black">New</span> - 標籤:
<span className="text-sm font-medium text-muted-foreground">Say Hello to Corewave v3.2</span>
- 內部的「New」徽章:
- 標題 —
motion.h1帶有mb-3 text-5xl font-medium leading-tight tracking-[-2px] md:text-7xl md:leading-[1.15]:- 第 1 行:
Your Insights. <br />- 第 2 行:
One Clear接著是 Instrument Serif 斜體的強調字詞:<span className="font-serif font-normal italic">Overview.</span>
- 第 1 行:
- 副標題 —
motion.p(data-testid="hero-subtitle")帶有mb-8 text-lg font-normal leading-6 opacity-90與行內style={{ color: "hsl(var(--hero-subtitle))" }}:Neuralyn helps teams track metrics, goals,<br />and progress with precision.
- CTA 按鈕 —
motion.button帶有rounded-full bg-foreground px-8 py-3.5 text-base font-medium text-background、whileHover={{ scale: 1.03 }}、whileTap={{ scale: 0.98 }}。標籤:Get Started for Free。
儀表板與影片區域
一個 motion.div(data-testid="dashboard-area")帶有 relative z-10 mt-12 w-screen md:mt-16 與行內 style={{ marginLeft: "calc(-50vw + 50%)", aspectRatio: "16 / 9" }} 以突破至全視窗寬度。
-
背景影片 —
<video>帶有absolute inset-0 h-full w-full object-cover,屬性autoPlay muted loop playsInline。src為VIDEO_URL:const VIDEO_URL = "/assets/hf_20260307_083826_e938b29f-a43a-41ec-a153-3d4730578ab8.mp4";注意:原始提示引用了遠端來源
https://d8j0ntlcm91z4.cloudfront.net/user_38xzzbokvigwjottwixh07lwa1p/hf_20260307_083826_e938b29f-a43a-41ec-a153-3d4730578ab8.mp4。該素材現已本地化到public/assets/hf_20260307_083826_e938b29f-a43a-41ec-a153-3d4730578ab8.mp4,並透過上述本地路徑引用。(原始 URL 在提示中以全大寫提供;此處依慣例將 scheme 與 host 轉為小寫,而路徑則保持不變。) -
儀表板圖片 — 包裹在
<div className="absolute inset-0 flex items-center justify-center">中,圖片為motion.img(data-testid="dashboard-image")帶有src={heroDashboard}、alt="Neuralyn analytics dashboard"、類別w-[90%] max-w-5xl rounded-2xl,以及行內style={{ y: dashboardY, mixBlendMode: "luminosity" }}。
底部漸層淡出
一個 <div>(data-testid="hero-fade")帶有 pointer-events-none absolute bottom-0 left-0 right-0 z-30 h-40 bg-gradient-to-t from-background to-transparent。
英雄區進入動畫
每個元素使用 initial={{ opacity: 0, y }} → animate={{ opacity: 1, y: 0 }},交錯出現:
| 元素 | y | duration | delay |
|---|---|---|---|
| 標籤膠囊 | 10 | 0.5s | 0 |
| 標題 | 20 | 0.6s | 0.1 |
| 副標題 | 20 | 0.6s | 0.2 |
| CTA | 20 | 0.6s | 0.3 |
| 儀表板區域 | 40 | 0.8s | 0.4 |
英雄區匯入
import { useRef } from "react";
import { motion, useScroll, useTransform } from "framer-motion";
import { ChevronDown } from "lucide-react";
import { Button } from "@/components/ui/button";
import logo from "@/assets/logo.png";
import heroDashboard from "@/assets/hero-dashboard.png";
區塊 2 — 見證區(src/components/Testimonial.tsx)
區塊為 flex min-h-screen items-center justify-center px-8 py-24 md:px-28 md:py-32 帶有 data-testid="testimonial"。內部有一個容器 <div ref={containerRef}> 為 mx-auto flex w-full max-w-3xl flex-col items-start gap-10(最大寬度 3xl、靠左對齊、元素間距 gap-10)。
引言文字
const QUOTE =
"Neuralyn revolutionized how we handle financial insights using smart analytics. We are now driving better outcomes quicker than we ever imagined! Neuralyn revolutionized how we handle financial insights using smart analytics.";
版面配置,從上到下
- 引言符號圖片 —
<img src={quoteSymbol} alt="" aria-hidden="true" className="h-10 w-14 object-contain" />。 - 見證段落 —
<p data-testid="testimonial-quote" className="flex flex-wrap text-4xl font-medium leading-[1.2] md:text-5xl">。引言以空格分割(QUOTE.split(" ")),每個字詞渲染為<Word>元件。在字詞之後,有一個右引號:<span className="ml-2 text-muted-foreground">”</span>。 - 作者列
(以下內容因原始檔案截斷而省略)