Stellar.ai — AI 生產力登陸主視覺
主視覺區塊取自 MIT 授權的
pulkitxm/claude-directory展示庫。
一個單螢幕、置中主視覺的 AI 生產力 SaaS 登陸頁面,包含導覽列、黑到灰漸層標題、主要行動呼籲按鈕、自動循環切換的四階段工作流程分頁列(分析、訓練、測試、部署)、循環背景影片與分頁驅動的疊加卡片,以及公司標誌列——所有元素皆以交錯淡入上移動畫呈現。使用 React 18、Vite、Tailwind CSS 3、Lucide 圖示以及 Inter 字型建構。
工作流程
- 將
example.html複製到使用者工作區作為工作檔案。 - 取代佔位內容,替換為使用者真實的品牌名稱、標題、正文、數字和圖片。更換素材時,請保持與現有圖片相同的尺寸。
- 保留設計系統。 下方建構規格中的配色、字型階層、間距節奏與動態效果為其核心識別——不可替換字型、重新配色或移除裝飾元素。
- 透過複製區塊來擴充,切勿從其他模板匯入佈局。若缺少某個區塊,請使用此模板自身的設計語言從頭開始設計。
- 保持動畫的無障礙性。 根據建構規格要求,所有動畫都必須受
prefers-reduced-motion媒體查詢控制。
輸出合約
在 <artifact> 標籤內輸出:
<artifact identifier="stellar-ai-landing-hero" type="text/html" title="Stellar.ai — AI 生產力登陸主視覺">
<!doctype html>
<html>...</html>
</artifact>
建構規格
以下為產生此設計的上游提示,逐字呈現。
Stellar.ai — 登陸頁面主視覺區塊
概述
為「Stellar.ai」AI 生產力登陸頁面建構主視覺區塊。這是一個單螢幕、置中、白色背景的佈局,包含導覽列、漸層標題、行動呼籲按鈕、自動循環分頁列、循環背景影片搭配四個分頁驅動的疊加卡片,以及一排公司標誌。所有元素皆以交錯的淡入上移動畫呈現。
技術棧
- 框架: React 18(
react^18.3.1,react-dom^18.3.1),使用React.StrictMode啟動。 - 建構工具: Vite(
vite^5.4.11)搭配@vitejs/plugin-react(^4.3.4)。 - 樣式: Tailwind CSS(
tailwindcss^3.4.17)搭配postcss(^8.4.49)和autoprefixer(^10.4.20)。預設配置,無主題擴充。 - 圖示: Lucide React(
lucide-react^0.468.0)。 - 字型: Inter(粗細 400, 500, 600, 700)從 Google Fonts 匯入。
- 測試工具: Playwright(
playwright^1.60.0)。 - 顯著技術: 使用交錯內聯
animationDelay的自訂 CSS 關鍵影格動畫、透過setInterval實現的自動循環分頁狀態,以及根據活躍分頁切換的條件式疊加元件。
全域設定
字型
在 index.html 中從 Google Fonts 匯入 Inter(粗細 400, 500, 600, 700)(加上 preconnect 提示):
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
rel="stylesheet"
/>
在 src/index.css 中設定 body 字型:
body {
font-family: 'Inter', sans-serif;
}
index.html
lang="en",charset="UTF-8",viewportwidth=device-width, initial-scale=1.0。<title>:Stellar.ai — 更聰明地工作,更快地行動。<meta name="description">:智慧型自動化與您喜愛的工具同步,以簡化任務、提升產出並節省時間。- 根掛載點:
<div id="root"></div>加上<script type="module" src="/src/main.jsx"></script>。
進入點(src/main.jsx)
import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.jsx'
import './index.css'
ReactDOM.createRoot(document.getElementById('root')).render(
<React.StrictMode>
<App />
</React.StrictMode>,
)
Tailwind 配置(tailwind.config.js)
預設配置,無自訂主題擴充。內容路徑:
/** @type {import('tailwindcss').Config} */
export default {
content: ['./index.html', './src/**/*.{js,jsx}'],
theme: {
extend: {},
},
plugins: [],
}
PostCSS 配置(postcss.config.js)
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
Vite 配置(vite.config.js)
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
})
動畫
定義在 src/index.css 中,位於 Tailwind 層(@tailwind base; @tailwind components; @tailwind utilities;)之上。
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.animate-fade-in-up {
animation: fadeInUp 0.6s ease-out forwards;
}
@keyframes fadeInOverlay {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.animate-fade-in-overlay {
animation: fadeInOverlay 0.4s ease-out forwards;
}
@keyframes fadeInDialog {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.animate-slide-up-overlay {
animation: fadeInDialog 0.5s ease-out forwards;
transform: translate(-50%, -50%);
}
fadeInUp→from { opacity: 0; transform: translateY(30px) }到{ opacity: 1; transform: translateY(0) }。類別.animate-fade-in-up以0.6s ease-out forwards執行。fadeInOverlay→from { opacity: 0 }到{ opacity: 1 }。類別.animate-fade-in-overlay以0.4s ease-out forwards執行。fadeInDialog→from { opacity: 0 }到{ opacity: 1 }。類別.animate-slide-up-overlay以0.5s ease-out forwards執行,並套用transform: translate(-50%, -50%)(用於置中的對話框卡片)。- 每個主要區塊都使用
.animate-fade-in-up,並搭配交錯的內聯animationDelay(從0.1s開始,每次增加0.1s)。每個元素都從內聯opacity: 0開始,以便動畫將其填充為可見。
佈局
- 根包裝器:
bg-white min-h-screen text-black。 - 頁面由一個
<Navigation />標頭加上一個置中的<main>組成。 <main>類別:px-6 pt-24 pb-32 max-w-7xl mx-auto text-center。
導覽列
包裝在 <header> 中,帶有 animate-fade-in-up 和內聯 style={{ opacity: 0, animationDelay: '0.1s' }}。<nav> 使用 px-6 py-4 flex items-center justify-between max-w-7xl mx-auto。
- 左側(標誌): 一個
<a href="#" className="flex items-center gap-2">,包含一個 LucideStar圖示(w-5 h-5 fill-black text-black)和品牌文字Stellar.ai,放在<span className="text-lg font-semibold">中。 - 中央(手機隱藏):
hidden md:flex items-center gap-8。四個連結:解決方案帶有ChevronDown圖示(w-4 h-4),連結類別flex items-center gap-1 text-sm text-gray-700 hover:text-black transition-colors。為團隊帶有ChevronDown圖示(w-4 h-4),相同連結類別。關於我們—text-sm text-gray-700 hover:text-black transition-colors。學習中心—text-sm text-gray-700 hover:text-black transition-colors。
- 右側:
flex items-center gap-4。登入連結 —text-sm text-gray-700 hover:text-black transition-colors。免費開始按鈕 —bg-black text-white px-5 py-2.5 rounded-full text-sm font-medium hover:bg-gray-800 transition-colors。
主視覺
所有主視覺元素都位於 <main> 內部,並使用 animate-fade-in-up 搭配交錯的內聯延遲。
評價徽章(延遲 0.2s)
- 包裝器:
inline-flex items-center gap-2 mb-8。 - 一個帶邊框的正方形:
w-6 h-6 border border-gray-300 rounded flex items-center justify-center,包含一個填滿的Star圖示(w-3.5 h-3.5 fill-black text-black)。 - 文字:
來自 18.3K+ 使用者的 4.9 星評價,使用text-sm font-medium text-black。
主要標題(延遲 0.3s)
<h1>類別:text-6xl md:text-7xl lg:text-[80px] font-normal leading-[1.1] tracking-tight mb-5。- 第一行:
更聰明地工作。更快地行動。 <br />- 第二行(漸層文字):
AI 為您注入動力。包裝在一個<span>中,帶有bg-gradient-to-r from-black via-gray-500 to-gray-400 bg-clip-text text-transparent。
副標題(延遲 0.4s)
<p>類別:text-lg md:text-xl text-gray-600 mb-8 max-w-2xl mx-auto。- 文字:
智慧型自動化與您喜愛的工具同步,以簡化任務、提升產出並節省時間。
行動呼籲按鈕(延遲 0.5s)
- 包裝在
div中,帶有animate-fade-in-up和內聯style={{ opacity: 0, animationDelay: '0.5s' }}。 - 按鈕類別:
bg-black text-white px-8 py-3 rounded-full text-base font-medium hover:bg-gray-800 transition-colors mb-12。 - 文字:
開始免費試用。
分頁列(延遲 0.6s)
包裝器:animate-fade-in-up flex justify-center mb-8 搭配內聯 style={{ opacity: 0, animationDelay: '0.6s' }}。
四個分頁,定義為 TABS 常數:
const TABS = [
{ id: 'analyse', label: '分析', icon: BarChart3 },
{ id: 'train', label: '訓練', icon: BookOpen },
{ id: 'testing', label: '測試', icon: Users },
{ id: 'deploy', label: '部署', icon: Rocket },
]
- 手機(
md:hidden): 一個 2×2 網格 —md:hidden grid grid-cols-2 gap-1 bg-gray-100 rounded-lg p-1— 顯示所有四個按鈕。 - 桌上型電腦(
hidden md:flex): 一行 —hidden md:flex items-center bg-gray-100 rounded-lg p-1— 除了第一個按鈕外,每個按鈕前都有一個垂直分隔線:<div className="w-px h-5 bg-gray-300 mx-1" />。 - 每個分頁按鈕:
flex items-center justify-center gap-2 px-5 py-2 rounded-md text-sm font-medium transition-colors,帶有一個 Lucide 圖示(w-4 h-4)和標籤。- 活躍:
bg-white text-black shadow-sm。 - 非活躍:
text-gray-600。
- 活躍:
- 分頁每
4000ms(4 秒)透過setInterval自動循環,使用useEffect內部的setInterval,前進到下一個分頁 id(循環)。狀態:useState('analyse')。在卸載時清除間隔。
useEffect(() => {
const interval = setInterval(() => {
setActiveTab((current) => {
const index = TABS.findIndex((tab) => tab.id === current)
return TABS[(index + 1) % TABS.length].id
})
}, 4000)
return () => clearInterval(interval)
}, [])
影片 + 疊加區塊(延遲 0.7s)
-
容器:
animate-fade-in-up relative rounded-3xl overflow-hidden h-[400px] md:h-[500px]搭配內聯style={{ opacity: 0, animationDelay: '0.7s' }}。 -
影片元素:
autoPlay,loop,muted,playsInline,類別w-full h-full object-cover。來源來自一個VIDEO_SRC常數:const VIDEO_SRC = '/assets/hf_20260319_165750_358b1e72-c921-48b7-aaac-f200994f32fb.mp4'注意: 原始簡報引用了一個遠端 CloudFront URL(
https://d8j0ntlcm91z4.cloudfront.net/user_38xzzbokvigwjottwixh07lwa1p/hf_20260319_165750_358b1e72-c921-48b7-aaac-f200994f32fb.mp4)。該素材已從供應商處本地化,來源現在指向/assets/hf_20260319_165750_358b1e72-c921-48b7-aaac-f200994f32fb.mp4(從public/assets/提供)。本地路徑是事實來源。 -
活躍疊加層:
<ActiveOverlay key={activeTab} />— 疊加元件是從一個以活躍分頁 id 為鍵的OVERLAYS映射中選擇的,並在每次分頁變更時重新掛載(透過key)以重新觸發動畫。
const OVERLAYS = {
analyse: AnalyseOverlay,
train: TrainOverlay,
testing: TestingOverlay,
deploy: DeployOverlay,
}
共享疊加層外殼(OverlayCard)
每個疊加層都包裝在一個可重複使用的 OverlayCard 元件中,該元件渲染模糊背景和置中的動畫對話框卡片:
function OverlayCard({ children }) {
return (
<div className="absolute inset-0 animate-fade-in-overlay" style={{ opacity: 0 }}>
<div className="absolute inset-0 bg-black/30" />
<div
className="animate-slide-up-overlay absolute top-1/2 left-1/2 w-[calc(100%-3rem)] max-w-sm bg-white rounded-2xl shadow-2xl p-6 text-left"
style={{ opacity: 0 }}
>
{children}
</div>
</div>
)
}
- 外部包裝器:
absolute inset-0 animate-fade-in-overlay搭配內聯opacity: 0。 - 背景:
absolute inset-0 bg-black/30。 - 內部卡片:
animate-slide-up-overlay absolute top-1/2 left-1/2 w-[calc(100%-3rem)] max-w-sm bg-white rounded-2xl shadow-2xl p-6 text-left搭配內聯opacity: 0。
疊加層 A — 分析:「設定您的 AI 工作空間」
一個 4 步驟的設定精靈,帶有紫色進度條,進度 25%。
- 標題列(
flex items-center justify-between mb-1):標題<h3 className="text-base font-semibold text-black">設定您的 AI 工作空間</h3>和步驟計數器<span className="text-xs font-medium text-gray-500">步驟 1/4</span>。 - 副文字(
text-xs text-gray-500 mb-4):只需幾個快速步驟,Stellar.ai 即可開始工作。 - 進度軌道:
h-1.5 w-full bg-gray-100 rounded-full mb-5 overflow-hidden,填充部分h-full w-1/4 bg-purple-600 rounded-full。 - 步驟清單(
<ul className="space-y-3">),四個項目:連接您的工具— 狀態active匯入工作空間資料— 狀態pending配置 AI 助手— 狀態pending邀請您的團隊— 狀態pending
- 每個步驟:一個帶編號的徽章
w-6 h-6 rounded-full flex items-center justify-center text-xs font-semibold和一個標籤。- 活躍徽章:
bg-purple-600 text-white;活躍標籤:font-medium text-black。 - 待辦徽章:
bg-gray-100 text-gray-400;待辦標籤:text-gray-500。
- 活躍徽章:
疊加層 B — 訓練:「AI 模型訓練」
一個訓練面板,帶有橘色進度條,進度 67%,以及四個指標卡片。
- 標題列(
flex items-center justify-between mb-1):標題<h3 className="text-base font-semibold text-black">AI 模型訓練</h3>和一個狀態膠囊flex items-center gap-1.5 text-xs font-medium text-orange-600,包含一個脈衝點(w-1.5 h-1.5 rounded-full bg-orange-500 animate-pulse)和文字執行中。 - 副文字(
text-xs text-gray-500 mb-4):微調模型以獲得最佳性能。
...
[已因字數限制截斷]