用这个模板做的 2 个案例
同一份提示词,不同的 [VARIABLES] 变量。点一个在上方预览。关于这个模板
单页项目板:四列(待办、本周、进行中、已完成)带实时计数;卡片带有彩色标签、知道何时逾期的到期标签、指派人首字母圆点和检查项计数。拖拽是使用指针事件手写实现的——卡片抬起时带有倾斜和阴影,列会高亮,放下时动画归位——每张卡片还都有“左移/右移”菜单,因此无需指针也能操作看板。卡片详情弹窗可编辑标题、描述、标签、截止日期和子任务;删除会附带撤销提示。筛选栏(文本搜索、标签筛选片、仅看逾期开关)会原地淡化不匹配的卡片;每列都有内联添加器可添加卡片;所有内容都持久化到 localStorage,并提供“重置看板”操作。默认看板规划了一个虚构的产品发布,但其结构适合任何团队的看板。外观是温暖的纸张感:柔和的板面底色、墨色卡片、四种标签颜色、有触感的阴影。没有拖拽库,没有网络请求。
模板提示词
在线演示就是用这份提示词原样做出来的,没有额外补充。其他案例只是改了 [VARIABLES] 变量的值。 提示词保持英文原版,国内常用的 AI 编程工具都能直接理解;下面附中文参考译文。
# Kanban Project Board App
Build this website exactly as described below. Replace the [VARIABLES] with your own values; keep everything else.
## Brief
A single-page board for [BOARD], the team planning [PROJECT]. Four columns; drag cards between them (hand-rolled pointer DnD) or move them from a keyboard menu; open cards in a detail modal to edit everything; filter by search, label or overdue; add cards inline; it all persists in localStorage and a Reset board action restores the sample board. One page, index.html; nothing leaves the browser.
- Audience: A small team (3–5 invented teammates) and anyone who wants their week visible at a glance: the board must read in five seconds and never lose a card.
- Goal: Make the plan feel handled. Within ten seconds the visitor drags a card and feels the physics; within a minute they've opened a card, ticked a subtask and filtered to overdue.
- Tone: Teammate-casual: card titles are imperative and short, the empty column has one gentle joke.
## Stack
- Framework: Vite 5 + React 18 + TypeScript
- Styling: Tailwind CSS 3.4
- Libraries: react (MIT), react-dom (MIT), motion (motion.dev, import from 'motion/react') (MIT), lucide-react (ISC), tailwindcss (MIT), postcss (MIT), autoprefixer (MIT), vite (MIT), @vitejs/plugin-react (MIT), typescript (Apache-2.0), @fontsource-variable/bricolage-grotesque (OFL-1.1), @fontsource-variable/inter (OFL-1.1)
- Build: `npm run build` → static files in `dist/`. No backend, no server code, no external APIs.
- Setup:
- Scaffold with npm create vite@latest using the react-ts template (pin the version if the latest template targets newer majors), then keep one real HTML page: index.html (entry src/main.tsx).
- vite.config.ts: base './', plugins [react()], build { outDir 'dist', sourcemap false, assetsInlineLimit 0 }. Do not copy src/ into dist/.
- Tailwind 3.4 through PostCSS, content ['./index.html', './src/**/*.{ts,tsx}']. In tailwind.config.ts add every color under Design to theme.extend.colors with kebab-case keys (board, panel, card, line, ink, softink, spruce, spruce-deep, spruce-mist, clay, ochre, plum, moss, slateink, good) and fontFamily display ['Bricolage Grotesque Variable', 'system-ui', 'sans-serif'], sans ['Inter Variable', 'system-ui', 'sans-serif']. Set borderRadius DEFAULT to 12px and add maxWidth { shell: '1480px' }.
- In src/fonts.ts import '@fontsource-variable/bricolage-grotesque' and '@fontsource-variable/inter'; import src/fonts.ts and src/index.css from the entry file.
- File layout: src/content.ts (board title, teammates, label set, the seeded cards and every label, typed — cards: { id, title, desc, labels: string[], due: 'today'|'tomorrow'|'in 3 days'|'next week'|null, done?: boolean, assignees: string[], checks: { text, done }[] }), src/lib/brand.ts (boardSlug = [BOARD] lowercased with every run of non-alphanumeric characters replaced by '-', storageKey = boardSlug + ':board'), src/lib/storage.ts (safe localStorage get/set wrapped in try/catch), src/lib/due.ts (dueSort and overdue flags computed from a fixed demo 'today' anchor — the board ships with a static reference of which cards are overdue, so no live clock is needed: each card's overdue state is part of its data).
- State: src/store/board.ts is a tiny external store (useSyncExternalStore) holding { columns: { id: 'backlog'|'week'|'progress'|'done', cardIds: string[] }, cards: Record<id, Card>, filters: { q, labels: string[], overdueOnly } } persisted under storageKey; actions: moveCard, addCard, updateCard, deleteCard (with undo payload), toggleCheck, resetBoard.
- Drag-and-drop in src/lib/dnd.ts + src/components/Board.tsx: hand-rolled with Pointer Events (pointerdown on a card's grab handle → setPointerCapture, pointermove updates a fixed-position ghost, hit-testing against column rects with getBoundingClientRect, pointerdrop commits moveCard). While dragging: the ghost tilts 2deg and gains a soft shadow; the hovered column gets a Spruce Mist wash and its edge glows; the source slot holds a 1px Line placeholder. Auto-scroll the board horizontally when the pointer nears an edge. If the pointer type is touch, require the handle to avoid scrolling conflicts. Under prefers-reduced-motion the ghost follows without tilt or shadow (no animation on drop). Escape cancels a drag in progress.
- Components in src/components/: Topbar.tsx (Wordmark, ResetButton), FiltersBar.tsx (SearchInput, LabelChip, OverdueToggle), Board.tsx (Column.tsx with ColumnHeader.tsx, Composer.tsx, CardTile.tsx with DueChip.tsx, LabelDot.tsx, AssigneeDots.tsx, CardMenu.tsx), CardModal.tsx (TitleField.tsx, DescField.tsx, LabelPicker.tsx, DuePicker.tsx, CheckList.tsx), Toasts.tsx. src/pages/BoardPage.tsx composes them.
- CardTile: Panel card, 14px Inter 500 title (2-line clamp), a label row of LabelDots (8px circles with title tooltips), a foot row of DueChip (mono 11px; overdue in Clay, soon in Ochre, done in Moss with a strike) + checklist count ('2/5') + AssigneeDots (18px initials circles, overlapping, two shown then +N). Hover lifts 2px; the grab handle (GripVertical) appears on hover and always on touch.
- CardMenu: a small dropdown (ChevronDown on the tile): 'Open card', 'Move left', 'Move right', 'Delete'. Keyboard path for everything.
- CardModal: centered 560px panel over a scrim; traps focus; Escape closes; fields live-save on blur with a subtle saved tick; the CheckList toggles animate strikes; Delete shows an undo toast (3s) before the removal commits.
- Composer: an '+ Add card' ghost row per column that expands inline into a title input + Add/Cancel (Enter adds and keeps the composer open for the next card).
- public/favicon.svg as described under Assets. index.html: lang en, <meta name='theme-color' content='#EFEAE0'>, <link rel='icon' href='./favicon.svg' type='image/svg+xml'>, <title>[BOARD] — board</title>.
- Write ASSETS.md at the project root as described under Assets.
- dist/ holds index.html, hashed JS/CSS, the woff2 fonts and favicon.svg. Keep it under 4 MB.
## Variables
- [BOARD] — Board name (default: "Kettle Launch"). The invented board/project name. Used in the wordmark, title tag and localStorage key. Never a real product or company.
- [PROJECT] — What's planned (default: "a small kitchen-goods product launch"). One lowercase phrase naming the effort. Rewrites the topbar blurb, all card titles and subtasks so the board reads true for that project. Keep it concrete.
- [CREDIT] — keep a small "Template by VibeFather" link to https://vibefather.ai/t/kanban-project-board-app in the footer (default: yes; delete this line to remove it)
The copy under Pages & Sections is written for the default values. If your values differ, rewrite every headline, paragraph, label and image for them — same length, tone and structure. Layout, colors, type and motion stay as described.
Keep all copy, image paths and links in one content file (for example `src/content.ts`), keyed by section, so the content can be swapped later without touching components.
## Design
### Colors
- Board `#EFEAE0` — Page background — warm paper.
- Panel `#FBF9F4` — Column background.
- Card `#FFFFFF` — Cards, modal, composer.
- Line `#E2DCCE` — 1px hairlines: column borders, dividers, placeholder outline.
- Ink `#22201B` — Titles, body, icons.
- Soft Ink `#6B665B` — Counts, hints, empty states, placeholder text.
- Spruce `#3E6B5A` — The one accent: buttons, column count chips, focus ring, drag glow.
- Spruce Deep `#2F5346` — Hover and pressed primary.
- Spruce Mist `#E3EBE6` — Drag-hover column wash, selected label chips.
- Clay `#C0603A` — Label 1 and overdue chips.
- Ochre `#C9931B` — Label 2 and due-soon chips.
- Plum `#8B5CB8` — Label 3.
- Moss `#7B8F4A` — Label 4 and done states.
- Slate Ink `#10201A` — Text on spruce fills.
- Good `#4E8D5B` — Success toasts, saved tick.
### Typography
- Display: topbar wordmark, column headers, modal title — Bricolage Grotesque, warm and slightly quirky: Bricolage Grotesque (OFL), weights 400/600
- Text and UI: card titles, body, buttons, due chips — Inter: Inter (OFL), weights 400/500/600
### Layout & motion
- Spacing: 8px base unit. Shell max-width 1480px with 28px padding (16px under 900px). Columns: min-width 300px, gap 20px, horizontal scroll on overflow; column header 40px; cards stack with 12px gaps; cards 14px inner padding. Type scale: wordmark 20px Bricolage 600; column headers 15px Bricolage 600 with mono-like count chips; card titles 14px Inter 500; hints 12.5px Soft Ink; due chips 11px 600 tabular. Buttons: height 36px, Inter 600 13px; primary Spruce fill with Card text, ghost 1px Line border. Inputs: height 38px, Card fill, 1px Line border, focus Spruce border + 2px offset ring. Focus everywhere: 2px Spruce outline, 3px offset.
- Radius: 12px on columns and modal; 10px on cards, composer, buttons; 999px for chips, dots and toasts.
- Motion: Easing: a spring (stiffness 320, damping 28) for card drops; --ease-out cubic-bezier(0.22, 0.61, 0.36, 1) elsewhere. The board should feel like paper on felt — quick, no bounce overshoot beyond 2%.
- Motion: Drag: the ghost lifts (scale 1.02, 2deg tilt, soft shadow) over 120ms; the hovered column washes Spruce Mist over 120ms; drop commits with the spring (200ms settle); the vacated slot's placeholder fades in.
- Motion: View load: columns rise 10px staggered 60ms; cards inside stagger 25ms.
- Motion: Card interactions: hover lifts 2px (120ms); the grab handle fades in; ticking a subtask strikes the text (180ms) and pops the count.
- Motion: Move via menu: the card glides to its new column (layout animation, 260ms spring) — the same commit path as a drop.
- Motion: Filters: non-matching cards fade to 22% and sink 2px (160ms) in place — never reflow away; the column counts stay honest ('3 of 7 shown').
- Motion: Modal: scrim fades 160ms; the panel scales 0.97→1 with the spring; Escape reverses both.
- Motion: Toasts: rise 8px in 180ms with a 3s auto-dismiss bar; undo commits immediately when clicked.
- Motion: prefers-reduced-motion: reduce — no tilt/shadow on the ghost, no layout glides (cards jump), no staggers; filters still dim; the board stays fully usable. Use CSS @media in index.css plus Motion's useReducedMotion.
- Imagery: No photographs, no avatars, no logos: assignees are initials dots, labels are colored dots, and every glyph is lucide or inline SVG. Icons: lucide-react only, stroke width 1.75.
## Pages & Sections
### Board (`index.html`)
1. **Content file and copy rules** — All copy below is written for the defaults ([BOARD] = Kettle Launch, [PROJECT] = a small kitchen-goods product launch). Put every string, teammate, label and card in src/content.ts and render from it. If any variable differs, rewrite all card titles, descriptions, subtasks and the topbar blurb so they are specific and believable for that project, keeping the same structure and counts (4 columns; 11 cards total — 3 backlog, 3 this week, 3 in progress, 2 done; 4 labels; 4 teammates). Teammates (initials): 'AR' Alina Rios; 'JT' Jonah Tan; 'PV' Priya Verma; 'MB' Marcus Brand. Labels: 'design' Clay; 'copy' Ochre; 'build' Plum; 'ops' Moss. Cards — backlog: 'Photograph the pour-over set' (labels design, ops; due next week; AR; checks: 'borrow backdrop', 'charge lights' 0/2); 'Write the launch note' (copy; due null; JT; 0/3: 'draft', 'edit', 'proofread'); 'Pick packaging insert card' (design; due in 3 days; AR; 0/2). this-week: 'Lock the bundle price' (ops; due tomorrow; MB; 0/2); 'Size chart for enamel mugs' (design; due tomorrow; PV; 1/3); 'Order mailer boxes (200)' (ops; due in 3 days; MB; 0/1). in-progress: 'Build the product page' (build; due tomorrow; JT+PV; 2/5); 'Cut the 20s kettle film' (build; due today, OVERDUE-flagged sample; AR; 1/4); 'Proof the checkout flow' (build; due in 3 days; JT; 0/3). done: 'Choose the name' (copy; done; AR+JT; 3/3, due next week); 'Sign the co-packer' (ops; done; MB; 2/2, due next week). The overdue state ships in the card data (one deliberately overdue card so the filter demonstrates); nothing computes from the real clock.
Layout: n/a
Motion: n/a
2. **Topbar** — Left: the wordmark '[BOARD]' (Bricolage 600 20px Ink) over 'Planning [PROJECT]' (12px Soft Ink). Right: a live 'overdue: 1' chip (Clay, only when overdue cards exist and aren't filtered out), a ghost 'Reset board' button (RotateCcw) with a confirm popover ('Restore the sample board? Your changes go away.'), and a saved indicator: a small Good dot 'Saved in this browser'.
Layout: Sticky top, 64px, Board ground at 92% with backdrop blur, Line bottom border.
3. **Filters bar** — One row under the topbar: SearchInput ('Search cards…', height 38px); the four LabelChips (dot + name; selected fills Spruce Mist with a Spruce border); an OverdueToggle switch ('Only overdue'); and the honest count line 'Showing 11 of 11'. Filters apply live; the count updates as 'Showing 2 of 11'.
Layout: Flex row, wraps under 900px; sits above the board scroll area, not sticky.
4. **Board and columns** — Four Columns side by side (horizontal scroll on narrow screens): Backlog (dot Soft Ink), This week (Ochre), In progress (Clay), Done (Moss). ColumnHeader: name (Bricolage 600 15px), count chip (12px, Line border), and — only on 'In progress' — a WIP hint chip 'wip 3/4' that turns Clay at 4. Cards stack as CardTiles; each column ends with its Composer ('+ Add card'). The empty filtered state (all cards dimmed) keeps columns in place. Empty column state: 'Nothing here — enjoy it while it lasts.'
Layout: Columns min-width 300px, Panel fill, 1px Line border, 12px radius, 14px inner padding; the board area scrolls horizontally with a subtle Line scrollbar.
5. **Card modal and toasts** — CardModal: TitleField (Inter 600 17px, contenteditable-style input), DescField (textarea, 3 rows), LabelPicker (the four chips), DuePicker (a select of the five sample options: — / today / tomorrow / in 3 days / next week), CheckList (toggle rows with strike animation, 'Add item' inline), assignee dots (read-only row), and Delete (Ruby ghost) with the undo toast. Toasts stack bottom-center: undo ('Card removed — Undo'), restock-style confirmations for moves made via menu ('Moved to Done'), and reset ('Sample board restored').
Layout: Modal centered, max-width 560px, Card fill, 20px padding; scrim 32% Ink; toasts max-width 420px.
## Assets
- image: No photographs or downloaded images: dots, chips, tiles and the favicon are drawn in code. Do not fetch or hotlink anything.
- image: Write ASSETS.md at the project root listing the code-drawn assets (label dots, initials dots, due chips, favicon — 'drawn in code, original') and the npm packages: @fontsource-variable/bricolage-grotesque and @fontsource-variable/inter (OFL-1.1) and lucide-react (ISC).
- icon: lucide-react only: Check, ChevronDown, GripVertical, Plus, RotateCcw, Search, Trash2, X. Stroke width 1.75, 14–20px, color inherits. public/favicon.svg: viewBox 0 0 32 32, a 32x32 rounded square filled #3E6B5A, three white rounded columns of differing heights (a board glyph). No brand logos.
- font: Install @fontsource-variable/bricolage-grotesque and @fontsource-variable/inter and import them in src/fonts.ts as listed in Setup. Vite bundles the woff2 files into dist/.
## Don'ts
- No backend, no form submission, no fetch to API: the board persists to localStorage under the board key; Reset restores the sample board.
- Every internal link points to a file name or in-app action (./index.html) — never to a bare directory; there is exactly one page.
- No real project tools or their UI (Trello, Linear, Jira, Notion, Asana): columns, labels and cards are invented; no 'kanban' vendor marks.
- No drag-and-drop library (dnd-kit, react-beautiful-dnd): pointer events are hand-rolled as specified, with the menu-based keyboard fallback.
- No dates from the real clock: due labels are the fixed sample strings, overdue state ships in card data, and nothing prints today's date or years.
- No photographs, no people, no avatars: assignees are initials dots on label-colored fills.
- Self-host everything: fonts through Fontsource, icons as npm packages or inline SVG. No CDN <script> or <link> tags, no Google Fonts, no analytics.
- Production build: minified, no source maps, no src/ copied into dist/, single command npm run build, output in dist/ under 4 MB.
- Never mention VibeFather inside the site except a footer credit line 'Built with a VibeFather template' linking https://vibefather.ai in the topbar overflow… — instead put it in the Reset popover's foot, one quiet line.
- Respect prefers-reduced-motion: no tilt/shadow glides or layout animations; drops commit instantly; filters still dim.
- The app must work at 1440x900 desktop and 390x844 mobile (columns stack vertically with a column switcher) with zero console errors; drag, menu moves, modal, filters and composer all work with keyboard only and visible focus rings.
- Accessibility: cards are buttons with aria-labels carrying their state (column, labels, due); drag announces moves via aria-live; the modal traps focus; label colors never carry meaning alone (dots pair with names).
---
— Prompt by VibeFather · https://vibefather.ai/t/kanban-project-board-app · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown
中文参考译文(帮助理解,复制给 AI 时请用上面的英文原版)
# 看板项目面板应用(Kanban Project Board App)
请完全按照以下描述构建此网站。将 [VARIABLES] 替换为你自己的值;其余内容保持不变。
## 简介
为 [BOARD] 打造的单页看板,这个团队正在规划 [PROJECT]。四列;在列之间拖动卡片(手写指针拖拽),或从键盘菜单移动卡片;在详情弹窗中打开卡片以编辑所有内容;按搜索、标签或逾期筛选;内联添加卡片;所有内容都持久化在 localStorage 中,Reset board 操作可恢复示例看板。单页,index.html;一切都不离开浏览器。
- 受众:一个小团队(3–5 名虚构队友)以及任何想让自己的每周安排一目了然的人:看板必须能在五秒内读懂,并且绝不丢失卡片。
- 目标:让计划显得尽在掌握。十秒内访客拖动一张卡片并感受到物理手感;一分钟内他们已打开一张卡片、勾选一个子任务并筛选到逾期。
- 语气:队友式随性:卡片标题是祈使句且简短,空列里有一个温和的玩笑。
## 技术栈(Stack)
- 框架(Framework):Vite 5 + React 18 + TypeScript
- 样式(Styling):Tailwind CSS 3.4
- 库(Libraries):react(MIT)、react-dom(MIT)、motion(motion.dev,从 'motion/react' 导入)(MIT)、lucide-react(ISC)、tailwindcss(MIT)、postcss(MIT)、autoprefixer(MIT)、vite(MIT)、@vitejs/plugin-react(MIT)、typescript(Apache-2.0)、@fontsource-variable/bricolage-grotesque(OFL-1.1)、@fontsource-variable/inter(OFL-1.1)
- 构建(Build):`npm run build` → 静态文件输出到 `dist/`。无后端、无服务端代码、无外部 API。
- 初始化(Setup):
- 使用 react-ts 模板通过 npm create vite@latest 脚手架创建(如果最新模板面向更新的主版本,则固定版本),然后保留一个真实的 HTML 页面:index.html(入口 src/main.tsx)。
- vite.config.ts:base './',plugins [react()],build { outDir 'dist',sourcemap false,assetsInlineLimit 0 }。不要将 src/ 复制到 dist/。
- 通过 PostCSS 使用 Tailwind 3.4,content ['./index.html', './src/**/*.{ts,tsx}']。在 tailwind.config.ts 中,将设计(Design)下的每种颜色以 kebab-case 键添加到 theme.extend.colors(board、panel、card、line、ink、softink、spruce、spruce-deep、spruce-mist、clay、ochre、plum、moss、slateink、good),并设置 fontFamily display ['Bricolage Grotesque Variable', 'system-ui', 'sans-serif']、sans ['Inter Variable', 'system-ui', 'sans-serif']。将 borderRadius DEFAULT 设为 12px,并添加 maxWidth { shell: '1480px' }。
- 在 src/fonts.ts 中导入 '@fontsource-variable/bricolage-grotesque' 和 '@fontsource-variable/inter';从入口文件导入 src/fonts.ts 和 src/index.css。
- 文件布局:src/content.ts(看板标题、队友、标签集、预置卡片和每个标签,带类型——cards: { id, title, desc, labels: string[], due: 'today'|'tomorrow'|'in 3 days'|'next week'|null, done?: boolean, assignees: string[], checks: { text, done }[] })、src/lib/brand.ts(boardSlug = [BOARD] 转为小写,并将每一段非字母数字字符替换为 '-',storageKey = boardSlug + ':board')、src/lib/storage.ts(用 try/catch 包裹的安全 localStorage get/set)、src/lib/due.ts(dueSort 和逾期标志基于固定的演示 'today' 锚点计算——看板自带哪些卡片已逾期的静态参考,因此无需实时时钟:每张卡片的逾期状态是其数据的一部分)。
- 状态(State):src/store/board.ts 是一个小型外部 store(useSyncExternalStore),持有 { columns: { id: 'backlog'|'week'|'progress'|'done', cardIds: string[] }, cards: Record<id, Card>, filters: { q, labels: string[], overdueOnly } },持久化在 storageKey 下;动作:moveCard、addCard、updateCard、deleteCard(带撤销载荷)、toggleCheck、resetBoard。
- 拖放(Drag-and-drop)位于 src/lib/dnd.ts + src/components/Board.tsx:使用 Pointer Events 手工实现(在卡片的抓取手柄上 pointerdown → setPointerCapture,pointermove 更新固定定位的幽灵元素,用 getBoundingClientRect 对列矩形进行命中测试,pointerdrop 提交 moveCard)。拖动时:幽灵元素倾斜 2deg 并增加柔和阴影;悬停的列获得 Spruce Mist 淡色覆盖且其边缘发光;源槽位保留一个 1px Line 占位符。当指针接近边缘时自动水平滚动看板。如果指针类型为触摸,则要求使用手柄以避免滚动冲突。在 prefers-reduced-motion 下,幽灵元素跟随但不倾斜、无阴影(放下时无动画)。Escape 取消进行中的拖动。
- src/components/ 中的组件:Topbar.tsx(Wordmark、ResetButton)、FiltersBar.tsx(SearchInput、LabelChip、OverdueToggle)、Board.tsx(Column.tsx 含 ColumnHeader.tsx、Composer.tsx、CardTile.tsx 含 DueChip.tsx、LabelDot.tsx、AssigneeDots.tsx、CardMenu.tsx)、CardModal.tsx(TitleField.tsx、DescField.tsx、LabelPicker.tsx、DuePicker.tsx、CheckList.tsx)、Toasts.tsx。src/pages/BoardPage.tsx 组合它们。
- CardTile:Panel 卡片,14px Inter 500 标题(2 行截断),一行 LabelDots(8px 圆点,带标题工具提示),一行脚部 DueChip(等宽 11px;逾期为 Clay,即将到期为 Ochre,已完成为 Moss 并带删除线)+ 清单计数('2/5')+ AssigneeDots(18px 首字母圆圈,重叠,显示两个然后 +N)。悬停上浮 2px;抓取手柄(GripVertical)在悬停时出现,触摸时始终显示。
- CardMenu:一个小型下拉菜单(卡片上的 ChevronDown):'Open card'、'Move left'、'Move right'、'Delete'。所有操作都有键盘路径。
- CardModal:居中的 560px 面板覆盖在遮罩上;捕获焦点;Escape 关闭;字段在失焦时实时保存并显示细微的已保存勾选;CheckList 切换时动画删除线;Delete 在移除提交前显示撤销 toast(3s)。
- Composer:每列一个 '+ Add card' 幽灵行,内联展开为标题输入 + Add/Cancel(Enter 添加并保持 composer 打开以输入下一张卡片)。
- public/favicon.svg 如资源(Assets)部分所述。index.html:lang en,<meta name='theme-color' content='#EFEAE0'>,<link rel='icon' href='./favicon.svg' type='image/svg+xml'>,<title>[BOARD] — board</title>。
- 在项目根目录编写 ASSETS.md,如资源(Assets)部分所述。
- dist/ 包含 index.html、带哈希的 JS/CSS、woff2 字体和 favicon.svg。保持在 4 MB 以下。
## 变量
- [BOARD] — 看板名称(默认:“Kettle Launch”)。虚构的看板/项目名称。用于字标、标题标签和 localStorage 键。绝不是真实的产品或公司。
- [PROJECT] — 计划的内容(默认:“a small kitchen-goods product launch”)。一个描述该工作的小写短语。重写顶栏简介、所有卡片标题和子任务,使看板对该项目而言读起来真实可信。保持具体。
- [CREDIT] — 在页脚保留一个小型“Template by VibeFather”链接,指向 https://vibefather.ai/t/kanban-project-board-app(默认:是;删除此行即可移除)
Pages & Sections 下的文案是为默认值编写的。如果你的值不同,请为它们重写每个标题、段落、标签和图片——保持相同的长度、语气和结构。布局、颜色、字体和动效保持所述不变。
将所有文案、图片路径和链接放在一个内容文件中(例如 `src/content.ts`),按区块作为键,以便之后无需改动组件即可替换内容。
## 设计
### 颜色(Colors)
- Board `#EFEAE0` — 页面背景 — 暖纸色。
- Panel `#FBF9F4` — 列背景。
- Card `#FFFFFF` — 卡片、模态框、输入区。
- Line `#E2DCCE` — 1px 细线:列边框、分隔线、占位符轮廓。
- Ink `#22201B` — 标题、正文、图标。
- Soft Ink `#6B665B` — 计数、提示、空状态、占位符文本。
- Spruce `#3E6B5A` — 唯一强调色:按钮、列计数标签、焦点环、拖拽光晕。
- Spruce Deep `#2F5346` — 主按钮的悬停与按下态。
- Spruce Mist `#E3EBE6` — 拖拽悬停时的列底色、选中的标签标签。
- Clay `#C0603A` — 标签 1 和逾期标签。
- Ochre `#C9931B` — 标签 2 和即将到期标签。
- Plum `#8B5CB8` — 标签 3。
- Moss `#7B8F4A` — 标签 4 和完成状态。
- Slate Ink `#10201A` — Spruce 填充上的文字。
- Good `#4E8D5B` — 成功提示、已保存对勾。
### 排版(Typography)
- 展示字体:顶栏字标、列标题、模态框标题 — Bricolage Grotesque,温暖且略带俏皮:Bricolage Grotesque (OFL),字重 400/600
- 文本与 UI:卡片标题、正文、按钮、到期标签 — Inter:Inter (OFL),字重 400/500/600
### 布局与动效(Layout & motion)
- 间距:8px 基准单位。外壳最大宽度 1480px,内边距 28px(900px 以下为 16px)。列:最小宽度 300px,间距 20px,溢出时水平滚动;列头 40px;卡片堆叠间距 12px;卡片内边距 14px。字号层级:字标 20px Bricolage 600;列标题 15px Bricolage 600,配等宽风格计数标签;卡片标题 14px Inter 500;提示 12.5px Soft Ink;到期标签 11px 600 等宽数字。按钮:高度 36px,Inter 600 13px;主按钮 Spruce 填充配 Card 文字色,幽灵按钮 1px Line 边框。输入框:高度 38px,Card 填充,1px Line 边框,聚焦时 Spruce 边框 + 2px 偏移环。全局焦点:2px Spruce 轮廓,3px 偏移。
- 圆角:列和模态框 12px;卡片、输入区、按钮 10px;标签、圆点和提示 999px。
- 动效:缓动:卡片落下使用弹簧(stiffness 320, damping 28);其他位置使用 --ease-out cubic-bezier(0.22, 0.61, 0.36, 1)。看板应像毛毡上的纸 — 快速,回弹过冲不超过 2%。
- 动效:拖拽:拖拽幽灵在 120ms 内抬起(scale 1.02、2deg 倾斜、柔和阴影);悬停的列在 120ms 内以 Spruce Mist 泛染;放下时以弹簧提交(200ms 稳定);腾空槽位的占位符淡入。
- 动效:视图加载:列以 60ms 错峰上升 10px;内部卡片错峰 25ms。
- 动效:卡片交互:悬停上浮 2px(120ms);抓取手柄淡入;勾选子任务时文字删除线(180ms)并弹出计数。
- 动效:通过菜单移动:卡片滑向新列(布局动画,260ms 弹簧)— 与放下走同一提交路径。
- 动效:筛选:不匹配的卡片在原位淡至 22% 并下沉 2px(160ms)— 绝不重排移走;列计数保持诚实('3 of 7 shown')。
- 动效:模态框:遮罩淡入 160ms;面板以弹簧从 0.97→1 缩放;Escape 反向执行两者。
- 动效:提示:180ms 内上升 8px,带 3s 自动消失条;点击时撤销立即提交。
- 动效:prefers-reduced-motion: reduce — 幽灵无倾斜/阴影,无布局滑动(卡片跳变),无错峰;筛选仍然变暗;看板保持完全可用。在 index.css 中使用 CSS @media 加上 Motion 的 useReducedMotion。
- 图像:无照片、无头像、无标志:被分配人是首字母圆点,标签是彩色圆点,所有字形均为 lucide 或内联 SVG。图标:仅 lucide-react,描边宽度 1.75。
## 页面与区块
### 看板(`index.html`)
1. **内容文件与文案规则** — 以下所有文案均针对默认值编写([BOARD] = Kettle Launch,[PROJECT] = 一个小型厨房用品产品发布)。将每个字符串、队友、标签和卡片放入 src/content.ts 并从中渲染。如果任何变量不同,请重写所有卡片标题、描述、子任务和顶栏简介,使其对该项目具体且可信,同时保持相同的结构和数量(4 列;共 11 张卡片——3 张待办、3 张本周、3 张进行中、2 张已完成;4 个标签;4 名队友)。队友(首字母):'AR' Alina Rios;'JT' Jonah Tan;'PV' Priya Verma;'MB' Marcus Brand。标签:'design' Clay;'copy' Ochre;'build' Plum;'ops' Moss。卡片——待办:'Photograph the pour-over set'(标签 design、ops;截止下周;AR;检查项:'borrow backdrop'、'charge lights' 0/2);'Write the launch note'(copy;截止 null;JT;0/3:'draft'、'edit'、'proofread');'Pick packaging insert card'(design;截止 3 天后;AR;0/2)。本周:'Lock the bundle price'(ops;截止明天;MB;0/2);'Size chart for enamel mugs'(design;截止明天;PV;1/3);'Order mailer boxes (200)'(ops;截止 3 天后;MB;0/1)。进行中:'Build the product page'(build;截止明天;JT+PV;2/5);'Cut the 20s kettle film'(build;截止今天,标记为 OVERDUE 的示例;AR;1/4);'Proof the checkout flow'(build;截止 3 天后;JT;0/3)。已完成:'Choose the name'(copy;已完成;AR+JT;3/3,截止下周);'Sign the co-packer'(ops;已完成;MB;2/2,截止下周)。逾期状态随卡片数据一起提供(一张故意逾期的卡片,以便筛选器演示);不根据真实时钟计算任何内容。
布局:不适用
动效:不适用
2. **顶栏** — 左侧:字标 '[BOARD]'(Bricolage 600 20px Ink)位于 'Planning [PROJECT]'(12px Soft Ink)上方。右侧:一个实时 'overdue: 1' 标签(Clay,仅当存在逾期卡片且未被筛选掉时显示)、一个幽灵 'Reset board' 按钮(RotateCcw)带确认弹出框('Restore the sample board? Your changes go away.'),以及一个保存指示器:一个小 Good 圆点 'Saved in this browser'。
布局:粘性顶部,64px,Board 底色 92% 带背景模糊,Line 底边框。
3. **筛选栏** — 顶栏下方一行:SearchInput('Search cards…',高度 38px);四个 LabelChips(圆点 + 名称;选中时填充 Spruce Mist 并带 Spruce 边框);一个 OverdueToggle 开关('Only overdue');以及诚实的计数行 'Showing 11 of 11'。筛选器实时生效;计数更新为 'Showing 2 of 11'。
布局:Flex 行,在 900px 以下换行;位于看板滚动区域上方,不粘性。
4. **看板与列** — 四列并排(窄屏上水平滚动):Backlog(圆点 Soft Ink)、This week(Ochre)、In progress(Clay)、Done(Moss)。ColumnHeader:名称(Bricolage 600 15px)、计数标签(12px,Line 边框),以及——仅在 'In progress' 上——一个 WIP 提示标签 'wip 3/4',在达到 4 时变为 Clay。卡片以 CardTiles 堆叠;每列以各自的 Composer('+ Add card')结尾。空筛选状态(所有卡片变暗)保持列位置不变。空列状态:'Nothing here — enjoy it while it lasts.'
布局:列最小宽度 300px,Panel 填充,1px Line 边框,12px 圆角,14px 内边距;看板区域水平滚动,带细微的 Line 滚动条。
5. **卡片模态框与提示消息** — CardModal:TitleField(Inter 600 17px,contenteditable 风格输入框)、DescField(文本域,3 行)、LabelPicker(四个标签)、DuePicker(五个示例选项的下拉选择:— / today / tomorrow / in 3 days / next week)、CheckList(带删除线动画的切换行,内联 'Add item')、负责人圆点(只读行),以及 Delete(Ruby 幽灵按钮)带撤销提示消息。提示消息堆叠在底部居中:撤销('Card removed — Undo')、通过菜单移动后的补货式确认('Moved to Done'),以及重置('Sample board restored')。
布局:模态框居中,最大宽度 560px,Card 填充,20px 内边距;遮罩 32% Ink;提示消息最大宽度 420px。
## 资产(Assets)
- 图片(image):不使用照片或下载的图片:圆点、标签、图块和 favicon 均以代码绘制。不要获取或热链任何内容。
- 图片(image):在项目根目录写入 ASSETS.md,列出以代码绘制的资产(标签圆点、首字母圆点、到期标签、favicon——“以代码绘制,原创”)以及 npm 包:@fontsource-variable/bricolage-grotesque 和 @fontsource-variable/inter(OFL-1.1)以及 lucide-react(ISC)。
- 图标(icon):仅使用 lucide-react:Check、ChevronDown、GripVertical、Plus、RotateCcw、Search、Trash2、X。描边宽度 1.75,14–20px,颜色继承。public/favicon.svg:viewBox 0 0 32 32,一个 32x32 的圆角方块填充 #3E6B5A,三根高度不同的白色圆角柱(一个看板字形)。不使用品牌标志。
- 字体(font):安装 @fontsource-variable/bricolage-grotesque 和 @fontsource-variable/inter,并按“设置(Setup)”中所列在 src/fonts.ts 中导入它们。Vite 会将 woff2 文件打包进 dist/。
## 禁止事项
- 无后端、无表单提交、无对 API 的 fetch 请求:看板通过 board key 持久化到 localStorage;Reset 恢复示例看板。
- 每个内部链接都指向文件名或应用内操作(./index.html)——绝不指向裸目录;只有一个页面。
- 不使用真实项目工具或其 UI(Trello、Linear、Jira、Notion、Asana):列、标签和卡片均为虚构;无“kanban”厂商标识。
- 不使用拖放库(dnd-kit、react-beautiful-dnd):指针事件按规范手写实现,并提供基于菜单的键盘回退方案。
- 不使用真实时钟的日期:到期标签为固定的示例字符串,逾期状态随卡片数据提供,且不打印今天的日期或年份。
- 不使用照片、人物、头像:受指派者为标签色填充上的首字母圆点。
- 一切自托管:字体通过 Fontsource,图标以 npm 包或内联 SVG 形式提供。不使用 CDN 的 <script> 或 <link> 标签,不使用 Google Fonts,不使用分析工具。
- 生产构建:压缩、无 source map、不将 src/ 复制进 dist/、单条命令 npm run build、输出位于 dist/ 且小于 4 MB。
- 除页脚署名行 'Built with a VibeFather template' 链接 https://vibefather.ai 外,绝不在站内提及 VibeFather……——而是将其放在 Reset 弹出层的底部,作为一行低调文字。
- 遵循 prefers-reduced-motion:无倾斜/阴影滑动或布局动画;拖放立即提交;筛选仍会变暗。
- 应用必须在 1440x900 桌面端和 390x844 移动端(列垂直堆叠并配有列切换器)下正常工作,且控制台零错误;拖拽、菜单移动、模态框、筛选和编辑器均须仅用键盘即可操作,并具有可见的焦点环。
- 无障碍:卡片为按钮,其 aria-label 携带其状态(列、标签、到期);拖拽通过 aria-live 播报移动;模态框捕获焦点;标签颜色绝不单独承载含义(圆点与名称配对)。
---
— Prompt by VibeFather · https://vibefather.ai/t/kanban-project-board-app · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown
个人项目可免费使用(CC BY-NC 4.0)。 商业用途需要 Pro.
DESIGN.md
单独的设计规范:配色、字体、间距和动效。可以把这套视觉用到你已有的项目上。
---
name: "Kanban Project Board App"
colors:
board: "#EFEAE0"
panel: "#FBF9F4"
card: "#FFFFFF"
line: "#E2DCCE"
ink: "#22201B"
soft_ink: "#6B665B"
spruce: "#3E6B5A"
spruce_deep: "#2F5346"
spruce_mist: "#E3EBE6"
clay: "#C0603A"
ochre: "#C9931B"
plum: "#8B5CB8"
moss: "#7B8F4A"
slate_ink: "#10201A"
good: "#4E8D5B"
typography:
display_topbar_wordmark_column_headers_modal_title_bricolage_grotesque_warm_and_slightly_quirky: { family: "Bricolage Grotesque", weights: [400, 600] }
text_and_ui_card_titles_body_buttons_due_chips_inter: { family: "Inter", weights: [400, 500, 600] }
spacing: "8px base unit. Shell max-width 1480px with 28px padding (16px under 900px). Columns: min-width 300px, gap 20px, horizontal scroll on overflow; column header 40px; cards stack with 12px gaps; cards 14px inner padding. Type scale: wordmark 20px Bricolage 600; column headers 15px Bricolage 600 with mono-like count chips; card titles 14px Inter 500; hints 12.5px Soft Ink; due chips 11px 600 tabular. Buttons: height 36px, Inter 600 13px; primary Spruce fill with Card text, ghost 1px Line border. Inputs: height 38px, Card fill, 1px Line border, focus Spruce border + 2px offset ring. Focus everywhere: 2px Spruce outline, 3px offset."
radius: "12px on columns and modal; 10px on cards, composer, buttons; 999px for chips, dots and toasts."
---
# Kanban Project Board App — Design System
Apply this design system to an existing project. It describes the look and feel only; for the full site, use prompt.md.
## Colors
- **Board** `#EFEAE0` — Page background — warm paper.
- **Panel** `#FBF9F4` — Column background.
- **Card** `#FFFFFF` — Cards, modal, composer.
- **Line** `#E2DCCE` — 1px hairlines: column borders, dividers, placeholder outline.
- **Ink** `#22201B` — Titles, body, icons.
- **Soft Ink** `#6B665B` — Counts, hints, empty states, placeholder text.
- **Spruce** `#3E6B5A` — The one accent: buttons, column count chips, focus ring, drag glow.
- **Spruce Deep** `#2F5346` — Hover and pressed primary.
- **Spruce Mist** `#E3EBE6` — Drag-hover column wash, selected label chips.
- **Clay** `#C0603A` — Label 1 and overdue chips.
- **Ochre** `#C9931B` — Label 2 and due-soon chips.
- **Plum** `#8B5CB8` — Label 3.
- **Moss** `#7B8F4A` — Label 4 and done states.
- **Slate Ink** `#10201A` — Text on spruce fills.
- **Good** `#4E8D5B` — Success toasts, saved tick.
## Typography
- **Display: topbar wordmark, column headers, modal title — Bricolage Grotesque, warm and slightly quirky** — Bricolage Grotesque (OFL), weights 400/600. Self-host the font files.
- **Text and UI: card titles, body, buttons, due chips — Inter** — Inter (OFL), weights 400/500/600. Self-host the font files.
## Spacing & shape
- Spacing: 8px base unit. Shell max-width 1480px with 28px padding (16px under 900px). Columns: min-width 300px, gap 20px, horizontal scroll on overflow; column header 40px; cards stack with 12px gaps; cards 14px inner padding. Type scale: wordmark 20px Bricolage 600; column headers 15px Bricolage 600 with mono-like count chips; card titles 14px Inter 500; hints 12.5px Soft Ink; due chips 11px 600 tabular. Buttons: height 36px, Inter 600 13px; primary Spruce fill with Card text, ghost 1px Line border. Inputs: height 38px, Card fill, 1px Line border, focus Spruce border + 2px offset ring. Focus everywhere: 2px Spruce outline, 3px offset.
- Radius: 12px on columns and modal; 10px on cards, composer, buttons; 999px for chips, dots and toasts.
## Motion
- Easing: a spring (stiffness 320, damping 28) for card drops; --ease-out cubic-bezier(0.22, 0.61, 0.36, 1) elsewhere. The board should feel like paper on felt — quick, no bounce overshoot beyond 2%.
- Drag: the ghost lifts (scale 1.02, 2deg tilt, soft shadow) over 120ms; the hovered column washes Spruce Mist over 120ms; drop commits with the spring (200ms settle); the vacated slot's placeholder fades in.
- View load: columns rise 10px staggered 60ms; cards inside stagger 25ms.
- Card interactions: hover lifts 2px (120ms); the grab handle fades in; ticking a subtask strikes the text (180ms) and pops the count.
- Move via menu: the card glides to its new column (layout animation, 260ms spring) — the same commit path as a drop.
- Filters: non-matching cards fade to 22% and sink 2px (160ms) in place — never reflow away; the column counts stay honest ('3 of 7 shown').
- Modal: scrim fades 160ms; the panel scales 0.97→1 with the spring; Escape reverses both.
- Toasts: rise 8px in 180ms with a 3s auto-dismiss bar; undo commits immediately when clicked.
- prefers-reduced-motion: reduce — no tilt/shadow on the ghost, no layout glides (cards jump), no staggers; filters still dim; the board stays fully usable. Use CSS @media in index.css plus Motion's useReducedMotion.
## Imagery
No photographs, no avatars, no logos: assignees are initials dots, labels are colored dots, and every glyph is lucide or inline SVG. Icons: lucide-react only, stroke width 1.75.
## Tone
Teammate-casual: card titles are imperative and short, the empty column has one gentle joke.
---
— Prompt by VibeFather · https://vibefather.ai/t/kanban-project-board-app · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown
改成你自己的
- 婚礼策划师:将 BOARD 设置为新人的名字,将 PROJECT 重写为婚礼日,并在四列中为场地、餐饮、邀请函和最终彩排预置卡片。
- 小型工作室的冲刺看板:保留四列,将标签集替换为设计、构建、审查和阻塞,并将指派人首字母设置为你的真实团队成员。
- 自由职业开发者跟踪客户工作:将 BOARD 设置为你的业务名称,将发布卡片换成发现、构建、移交和已开票,并使用到期标签表示截止日期。
- 内容团队的编辑日历:将 PROJECT 重写为月度期刊,为选题、草稿、编辑和已发布预置卡片,并使用仅看逾期开关发现进度落后的稿件。
看板项目板应用:常见问题
看板项目板应用中的拖拽是如何工作的,如果我无法拖拽会怎样?
看板项目板应用中的拖拽是使用指针事件手写实现的,不是拖拽库。抓住卡片的手柄,卡片会带着轻微倾斜和柔和阴影抬起,悬停的列会获得一层底色和光晕,放下时弹回原位。每张卡片也都有“左移”和“右移”菜单,因此无需指针也能完全操作看板,包括在触摸设备上(需要抓取手柄)。
怎么用 AI 做一个看板项目板应用?
复制本页的提示词,或者运行 npx vibefather add kanban-project-board-app,把 [BOARD]、[PROJECT] 换成你自己的内容,再粘贴到 Claude Code、Codex、Cursor 等 AI 编程工具里。在线演示就是用这份提示词原样做出来的。