MindStudio Interface Designer — Master Frontend Skill
This skill governs every UI/UX task performed via Claude Code through the MindStudio local tunnel. It combines collaborative design discovery, bold aesthetic execution, comprehensive UX intelligence, React performance best practices, and a rigorous pre-delivery quality checklist — all tuned specifically for the MindStudio Interface Designer environment.
The Interface Designer outputs React components that are compiled and deployed directly into MindStudio User Input blocks. Every interface you build here is a live, interactive part of an AI agent workflow. Design accordingly: the interface must be functional, polished, accessible, and feel native to the product it serves.
Phase 1: Discovery — Always Interview First
Never jump straight to code. Before any design or implementation work, run a focused discovery conversation. Ask one question at a time. Prefer multiple-choice when possible. The goal is to understand purpose, user, constraints, and aesthetic direction before a single line of code is written.
Discovery Questions (ask sequentially, stop when you have enough)
Question 1 — Purpose
What is this interface collecting or communicating? Pick the closest:
- - A) A form or data collection step inside an AI workflow
- B) An onboarding or multi-step wizard
- C) A dashboard or data display
- D) A creative tool or interactive experience
- E) Something else (describe it)
Question 2 — User
Who will use this interface?
- - A) Internal team / operations
- B) End customers / consumers
- C) Business clients / B2B
- D) The builder themselves (testing/prototyping)
Question 3 — Tone & Feel
What feeling should this interface communicate? Pick one or two:
- - A) Professional and trustworthy
- B) Warm and approachable
- C) Bold and energetic
- D) Minimal and focused
- E) Luxurious and refined
- F) Playful and fun
- G) Technical and precise
Question 4 — Visual Constraints
Do you have brand colors, fonts, or an existing design system to match?
- - A) Yes — share them (hex codes, font names, logo)
- B) Loosely — here's a reference site or screenshot
- C) No — give me your best creative direction
Question 5 — Technical Constraints
Any technical requirements?
- - A) Must work in MindStudio's React environment (default — always assume this)
- B) Specific npm packages required
- C) Must match an existing component library (shadcn, MUI, etc.)
- D) No constraints beyond MindStudio compatibility
Question 6 — MindStudio Variable Mapping (REQUIRED)
This is critical. In MindStudio, every input the user fills out gets passed as a variable into the rest of the agent workflow. For each input field in the interface, we need to know its variable name so the component can wire them up correctly.
Ask the user:
"Let's map your inputs to MindStudio variables. For each field in this interface, what should the variable be named? For example: topic, tone, keywords, content_type. List each field and its variable name."
If the user isn't sure, suggest names based on the interface purpose and ask them to confirm or adjust. For example, for a LinkedIn post generator:
| Field | Suggested Variable |
|---|
| Raw idea / topic | INLINECODE4 |
| Tone of voice |
tone |
| Post length |
post_length |
| Keywords |
keywords |
| Content format |
content_type |
Once confirmed, use these exact variable names throughout the component. Do not invent variable names. Do not use generic names like input1 or field_value.
Variable Wiring Pattern
Every confirmed variable must be captured in component state using its exact MindStudio variable name and surfaced for the workflow. Use this pattern:
CODEBLOCK0
Always display a variable reference summary in a code comment at the top of the component so it's clear to the MindStudio builder which variables the interface produces:
CODEBLOCK1
After Discovery
Once you understand what you're building, present the design plan in sections of 200-300 words. Check in after each section before proceeding. Cover:
- 1. Aesthetic direction and rationale
- Component structure and layout
- Data flow and state management
- Interaction patterns and animations
- Accessibility and edge cases
Ask: "Does this direction feel right? Any adjustments before I build?"
Propose 2-3 approaches when trade-offs exist. Lead with your recommendation and explain why. Apply YAGNI ruthlessly — remove features that aren't needed for this specific interface.
Phase 2: Aesthetic Direction — Commit Boldly
Once discovery is complete, lock in a clear aesthetic direction and execute it with precision. Generic interfaces are forgettable. The best MindStudio interfaces feel purpose-built.
Choosing a Direction
Commit to one of these aesthetic archetypes (or a deliberate blend of two):
| Archetype | Character | Best For |
|---|
| Refined Minimal | Surgical whitespace, one accent color, perfect type | SaaS, B2B, professional tools |
| Luxury Editorial |
Serif display, high contrast, generous margins | Portfolios, premium services, creative agencies |
|
Dark Technical | Deep backgrounds, monospace accents, neon highlights | Developer tools, AI products, fintech |
|
Warm & Approachable | Rounded corners, soft palette, friendly type | Consumer apps, health, education |
|
Bold Brutalist | Raw grid, oversized type, stark contrast | Fashion, art, provocative brands |
|
Glassmorphic | Frosted panels, layered depth, soft blurs | Modern SaaS, dashboards, overlays |
|
Bento Grid | Card-based density, varied sizes, organized chaos | Dashboards, feature showcases |
|
Retro-Futuristic | Scan lines, phosphor glow, monospace | AI tools, tech demos, niche products |
|
Claymorphic | Inflated shapes, pastel 3D, playful shadows | Consumer apps, games, children's tools |
|
Organic/Natural | Earth tones, texture, flowing curves | Wellness, food, sustainability |
CRITICAL RULE: Choose a direction and commit fully. Halfhearted execution of any style is worse than bold execution of any other. The key is intentionality.
What Makes an Interface Unforgettable
Before coding, answer: What is the ONE thing a user will remember about this interface? It could be a font choice, an animation on entry, an unexpected color, a micro-interaction on submit. Identify it. Then build everything else to support it.
Phase 3: Design System — Build Before You Code
Establish these design tokens before writing components. Store them as CSS variables or a Tailwind config extension.
Typography
Pair a distinctive display font with a refined body font. Never default to Inter, Roboto, Arial, or system-ui as a primary choice.
Example pairings by archetype:
| Archetype | Display | Body |
|---|
| Luxury Editorial | Playfair Display, Cormorant Garamond | Lora, EB Garamond |
| Bold Brutalist |
Anton, Bebas Neue | IBM Plex Mono, Space Mono |
| Dark Technical | Syne, Oxanium | JetBrains Mono, Fira Code |
| Warm Approachable | Nunito, Quicksand | Source Sans Pro, DM Sans |
| Refined Minimal | Fraunces, Libre Baskerville | Figtree, Plus Jakarta Sans |
| Glassmorphic | Outfit, Syne | Manrope, DM Sans |
Rules:
- -
line-height for body: 1.5-1.75 - INLINECODE12 for readable text: 65-75 characters (ch units)
- Minimum 16px body text on mobile
- Scale: xs/sm/base/lg/xl/2xl/3xl/4xl — never use arbitrary sizes
Color System
Commit to a palette with clear roles. Every color must have a purpose.
CODEBLOCK2
Contrast requirements (WCAG AA minimum):
- - Normal text (under 18px): 4.5:1 minimum
- Large text (18px+ or 14px bold): 3:1 minimum
- Interactive elements against background: 3:1 minimum
- Never use gray-400 or lighter for body text in light mode
Palette archetypes by product type:
| Product | Primary Palette Direction |
|---|
| SaaS / B2B | Cool slate, indigo, neutral with blue accent |
| E-commerce |
High contrast black/white, product-driven accent |
| Healthcare | Calm blue-green, white, soft sage |
| Fintech | Deep navy, gold accent, crisp white |
| Beauty / Wellness | Rose, champagne, dusty sage, warm cream |
| Creative Agency | Monochrome base, electric accent |
| Education | Warm amber, forest green, cream |
| Gaming / Entertainment | Dark base, neon accent, high saturation |
Spacing Scale
Use an 8-point grid. Common values: 4, 8, 12, 16, 24, 32, 48, 64, 96, 128px. Never use arbitrary spacing.
Z-Index Scale
Define this explicitly to avoid stacking chaos:
CODEBLOCK3
Phase 4: Component Architecture (MindStudio React Environment)
MindStudio's Interface Designer runs a full React environment with hot reloading, npm package support, and live preview. Build as you would in a professional React project.
MindStudio-Specific Rules
- - Single root component: Export one default component that MindStudio compiles
- No SSR assumptions: This is a client-side React environment — avoid Next.js-specific APIs
- State is local: Use
useState, useReducer, and useContext — no Redux or external state stores unless explicitly needed - Responsive default: Assume the interface will render at various widths — always test at 375px, 768px, 1024px, 1440px
- No
<form> HTML tags: Use onClick/onChange handlers instead of native form submission
The MindStudio Bridge — CRITICAL
MindStudio automatically provides a ./bridge file in every Interface Designer project. This is the only correct way to submit data and advance the workflow to the next block. Never use window.MindStudio.submit or any other submission method — they will silently fail.
The bridge exposes:
| Export | Type | Purpose |
|---|
| INLINECODE21 | function | Sends form data to the workflow and advances to the next block |
| INLINECODE22 |
function | Uploads a file and returns a CDN URL |
|
requestFile(options?) | function | Prompts the user to pick a file or media from their library |
|
useIsRunning() | hook | Returns
true while the workflow is processing after submission |
|
useTemplateVariables() | hook | Returns current values of variables already set in the workflow |
Always import from the bridge at the top of every component:
CODEBLOCK4
Never use:
CODEBLOCK5
Component Structure Pattern
CODEBLOCK6
State Management Patterns
Multi-step forms:
CODEBLOCK7
Submit button loading state — use bridge hook, not manual state:
CODEBLOCK8
Form validation:
const [errors, setErrors] = useState<Record<string, string>>({})
// Validate on blur, not on every keystroke
// Show errors inline, near the field, not in a banner at the top
// Clear errors when the user corrects the field
// Only call submit() after validation passes
Phase 5: Visual Craft — The Details That Matter
Motion & Animation
Animations should feel purposeful, not decorative. Every animation earns its place.
Entry animations (page/component load):
CODEBLOCK10
Interaction timing:
- - Hover state transitions: 150-200ms ease-out
- Focus transitions: 100ms
- Page/step transitions: 300-400ms cubic-bezier
- Loading spinners: instant appear, 200ms fade-out on resolve
- Toasts/notifications: 250ms slide-in, 200ms fade-out
Performance rules for animation:
- - Only animate
transform and opacity — never width, height, top, left, INLINECODE33 - Use
will-change: transform sparingly, only on elements that definitely animate - Always include
prefers-reduced-motion override:
CODEBLOCK11
Backgrounds & Depth
Never default to a flat solid color background. Create atmosphere:
CODEBLOCK12
Glassmorphism (when appropriate)
CODEBLOCK13
Shadows
Use layered shadows for realism:
/* Soft elevation */
box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.08);
/* Medium card */
box-shadow: 0 2px 4px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.10);
/* Floating / modal */
box-shadow: 0 4px 8px rgba(0,0,0,0.06), 0 16px 48px rgba(0,0,0,0.14);
/* Colored accent shadow */
box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25); /* use primary color */
Phase 6: Interaction Design — Pixel-Perfect UX
Clickable Elements
Every interactive element must communicate its interactivity:
CODEBLOCK15
Touch target sizes:
- - Minimum 44x44px for all interactive elements on mobile
- Add padding rather than enlarging the visual element if needed
Form Inputs
CODEBLOCK16
Loading States
Never leave the user staring at a blank or frozen interface:
CODEBLOCK17
Hover States — Common Rules
| Situation | Do | Don't |
|---|
| Card hover | Color shift or shadow elevation | Scale transform that shifts layout |
| Button hover |
Darken background 10%, slight shadow | No visual change |
| Link hover | Color + underline | Only underline (too subtle) |
| Icon button | Background fill on hover | Nothing |
| Destructive action | Red tint on hover | Same as normal hover |
Icons
- - Always use SVG icon sets (Lucide, Heroicons, Phosphor, Radix Icons)
- Never use emoji as UI icons
- Keep icons consistent from one library per project
- Standard size: 16px (inline text), 20px (buttons), 24px (standalone)
- Always pair icons with accessible labels:
aria-label for icon-only buttons
Phase 7: Accessibility — Non-Negotiable
Every interface delivered must pass these checks.
ARIA & Semantic HTML
CODEBLOCK18
Keyboard Navigation
- - Tab order must match visual reading order
- All interactive elements reachable by keyboard
- Modals/drawers trap focus while open, return focus on close
- Escape key closes overlays
- Enter/Space activate buttons
Color & Contrast Checklist
- - Normal text on background: minimum 4.5:1
- Large text (18px+ regular, 14px+ bold): minimum 3:1
- Interactive element boundaries: minimum 3:1
- Use a tool like Stark or WebAIM Contrast Checker to verify
- Color is NEVER the only indicator of state (always pair with icon, label, or pattern)
Phase 8: React Performance — Build Fast Interfaces
Eliminating Waterfalls (CRITICAL)
Never chain async operations sequentially when they can run in parallel:
CODEBLOCK19
Bundle Size (CRITICAL)
CODEBLOCK20
Re-render Optimization
CODEBLOCK21
Rendering Performance
CODEBLOCK22
Common Pitfalls
| Don't | Do |
|---|
| Barrel imports | Import from source files directly |
| Sequential awaits for independent data |
Promise.all() |
|
items.sort() mutating array |
items.toSorted() |
| Create RegExp inside render | Hoist to module level |
| Heavy objects created in render | Hoist or memoize |
| Load analytics in critical path | Lazy-load with
dynamic() |
| Re-render whole tree for local state | Extract to focused child component |
Phase 9: Light/Dark Mode — Both Must Work
If the interface supports theming, both modes must be production-ready.
CODEBLOCK23
Critical light mode rules:
- - Glass cards:
bg-white/80 or higher — never bg-white/10 (invisible) - Body text:
#0f172a (slate-900) minimum — never gray-400 or lighter - Muted text:
#475569 (slate-600) minimum - Borders must be visible:
border-gray-200 not INLINECODE46
Critical dark mode rules:
- - Surface backgrounds need enough contrast from page background
- Text on dark: ensure sufficient luminance difference
- Colored elements may need adjusted saturation for dark contexts
Phase 10: Layout Patterns for MindStudio Interfaces
Responsive Breakpoints
CODEBLOCK24
Always verify:
- - No horizontal scroll on mobile
- No content hidden behind fixed/sticky elements
- Tap targets at least 44x44px
Common MindStudio Interface Layouts
Single-step form:
CODEBLOCK25
Multi-step wizard:
CODEBLOCK26
Dashboard / data display:
CODEBLOCK27
Navbar Rules
If the interface has a fixed navbar:
- - Add
top-4 left-4 right-4 for floating effect (not top-0 left-0 right-0) - Add padding-top to content equal to navbar height + gap
- Use same
max-w-6xl or max-w-7xl as page content
Phase 11: Industry-Specific Design Guidance
Use these as starting points, then differentiate within the direction.
SaaS / B2B Tools
- - Clean, data-forward, trust-building
- Neutral base (slate, gray) with a blue or indigo accent
- Dense information hierarchy, not decorative
- Typography: utilitarian but distinctive (Syne, Figtree, DM Sans)
E-commerce / Retail
- - Product-first — the UI should recede, product should shine
- Strong CTAs, clear value hierarchy
- Fast-loading, mobile-optimized above all
- Trust signals: ratings, reviews, guarantees near purchase actions
Healthcare / Wellness
- - Calm, reassuring, clinical clarity
- Blue-green, soft sage, white — never alarming colors
- Extra accessibility rigor: larger text defaults, clearer labels
- No unnecessary animation — focus over delight
Fintech / Finance
- - Precise, authoritative, secure-feeling
- Deep navy, charcoal, gold accent — never playful
- Data accuracy visual cues: monospace numbers, clear decimal alignment
- Typography: sharp serifs or clean geometric sans
Beauty / Luxury
- - Atmosphere over function
- Generous whitespace, refined typography (Cormorant, Playfair)
- Muted, sophisticated palette — champagne, rose, deep forest
- Subtle animations, hover reveals, image-forward
Creative / Agency
- - The interface IS the portfolio
- Bold choices: oversized type, unexpected layouts, strong color
- Can break conventions — asymmetry, overlapping elements, diagonal flow
- Signature moment: the one thing they'll remember
Phase 12: Pre-Delivery Checklist
Run every item before delivering code. No exceptions.
Visual Quality
- - [ ] No emoji used as UI icons — all icons are SVG (Lucide/Heroicons/Phosphor)
- [ ] All icons from one consistent library
- [ ] No generic fonts (Inter, Roboto, Arial) used as the primary display font
- [ ] Aesthetic direction is clearly committed — not a generic mix of styles
- [ ] Color palette has clear hierarchy: dominant, accent, semantic
- [ ] Light mode text contrast passes 4.5:1 (body), 3:1 (large text)
- [ ] Backgrounds have depth — not flat solid colors
Interaction
- - [ ] All clickable/interactive elements have INLINECODE51
- [ ] All hover states provide visible feedback (color, shadow, or border)
- [ ] All transitions use
transform/opacity (not layout properties) - [ ] Transition durations: 150-200ms for micro-interactions, 300ms for major transitions
- [ ] Loading states exist for all async operations
- [ ] Error states are visible, inline, and actionable
- [ ] Disabled states are visually distinct
Layout & Responsive
- - [ ] No horizontal scroll at 375px viewport
- [ ] No content hidden behind fixed navbars
- [ ] Consistent max-width container used throughout
- [ ] 8-point spacing grid respected
- [ ] Floating navbars have edge spacing (
top-4 left-4 right-4) - [ ] Touch targets minimum 44x44px on mobile
Accessibility
- - [ ] All images have descriptive
alt text (or alt="" for decorative) - [ ] All form inputs have associated
<label> elements - [ ] Icon-only buttons have INLINECODE58
- [ ] Focus states are visible (
focus-visible outline) - [ ] Tab order matches visual reading order
- [ ] Color is not the only indicator of state
- [ ]
prefers-reduced-motion media query respected - [ ] Error messages use
role="alert" or INLINECODE62
Light/Dark Mode (if applicable)
- - [ ] Light mode glass/transparent elements visible (opacity ≥ 0.6)
- [ ] Light mode muted text ≥ slate-600 (
#475569) - [ ] Dark mode borders visible (not
border-white/10 on dark bg) - [ ] Both modes tested visually before delivery
React Performance
- - [ ] No barrel imports from large libraries
- [ ] Independent data fetches use INLINECODE65
- [ ] Expensive components wrapped in
React.memo where appropriate - [ ] Stable callbacks use
useCallback with correct dependencies - [ ] No implicit falsy renders (
count && <X /> replaced with count > 0 && <X />) - [ ] No RegExp or heavy objects created inside render functions
- [ ] Dynamic imports used for non-critical heavy components
MindStudio Compatibility
- - [ ] No
<form> HTML tags — using onClick/onChange handlers - [ ] No SSR-only APIs (no Next.js-specific routing/image APIs unless confirmed)
- [ ] Single default export from the root component
- [ ] All state is local (no external state management unless explicitly requested)
- [ ] Component compiles without errors in MindStudio's React environment
- [ ]
submit and useIsRunning imported from ./bridge — never INLINECODE76 - [ ] Submit button uses
useIsRunning() from bridge for loading state — no manual setTimeout or status state - [ ]
submit(data) is called with all variable values on final submission - [ ] Every input field is wired to its confirmed MindStudio variable name — no invented or generic names (
input1, field_value, etc.) - [ ] State keys match the exact variable names confirmed during discovery
- [ ] Variable reference comment block at the top of the component lists all output variables with their types and descriptions
Quick Reference Card
Font Pairings (Never Use Inter/Roboto/Arial as Primary)
| Mood | Display | Body |
|---|
| Luxury | Cormorant Garamond | Lora |
| Editorial |
Playfair Display | Source Serif 4 |
| Technical | Syne | JetBrains Mono |
| Approachable | Nunito | DM Sans |
| Minimal | Fraunces | Figtree |
| Bold | Bebas Neue | IBM Plex Sans |
| Modern | Outfit | Manrope |
| Organic | Vollkorn | Nunito Sans |
Animation Timing Cheat Sheet
| Interaction | Duration | Easing |
|---|
| Hover state | 150ms | ease-out |
| Button active |
100ms | ease |
| Tooltip appear | 150ms | ease-out |
| Modal open | 300ms | cubic-bezier(0.16, 1, 0.3, 1) |
| Page transition | 400ms | cubic-bezier(0.16, 1, 0.3, 1) |
| Stagger delay | 60ms per item | — |
| Reduced motion | 0.01ms | — |
Shadow Scale
| Level | Value |
|---|
| Subtle | INLINECODE82 |
| Card |
0 2px 4px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.10) |
| Modal |
0 4px 8px rgba(0,0,0,0.06), 0 16px 48px rgba(0,0,0,0.14) |
| Colored |
0 8px 24px rgba(PRIMARY_RGB, 0.25) |
Responsive Breakpoints (Mobile First)
| Breakpoint | Width | Layout |
|---|
| default | 375px | Single column |
| sm |
640px | 2-col options |
| md | 768px | Side-by-side |
| lg | 1024px | Full multi-col |
| xl | 1280px | Max-width constrained |
Design Principles — The Foundation
These principles govern every decision made with this skill:
- 1. Discovery before design. Never assume. Ask first, build second.
- Commit fully. A half-executed aesthetic is worse than any aesthetic. Pick a direction and own it.
- The interface serves the workflow. This is inside a MindStudio AI agent. Function is as important as form.
- Unforgettable over safe. Generic is forgettable. Make one bold choice and everything else will follow.
- Accessibility is baseline. No interface ships without passing contrast, label, and keyboard checks.
- Performance is a feature. Fast interfaces feel better. Eliminate waterfalls, control bundle size.
- Details compound. The difference between good and great is 20 small decisions made correctly.
- One question at a time. Never overwhelm users during discovery. Slow down to go faster.
- YAGNI ruthlessly. Every feature that doesn't serve the stated need is a liability.
- Measure twice, build once. Present the design plan before coding. Validate before implementing.
MindStudio 界面设计师 — 掌握前端技能
此技能管理通过 MindStudio 本地隧道经由 Claude Code 执行的每项 UI/UX 任务。它融合了协作式设计探索、大胆的美学执行、全面的 UX 智能、React 性能最佳实践以及严格的交付前质量检查清单——全部专门针对 MindStudio 界面设计师环境进行了调优。
界面设计师输出 React 组件,这些组件被编译并直接部署到 MindStudio 用户输入块中。您在此构建的每个界面都是 AI 代理工作流中一个实时、可交互的部分。请据此设计:界面必须功能完善、精致优雅、易于访问,并与其所服务的产品融为一体。
阶段 1:探索 — 始终先进行访谈
切勿直接跳入编码。 在任何设计或实现工作之前,先进行有针对性的探索对话。一次只问一个问题。尽可能使用多项选择。目标是在编写任何代码之前,理解目的、用户、约束和美学方向。
探索问题(按顺序提问,获得足够信息后停止)
问题 1 — 目的
此界面收集或传达什么?选择最接近的选项:
- - A) AI 工作流中的表单或数据收集步骤
- B) 引导或多步骤向导
- C) 仪表盘或数据展示
- D) 创意工具或交互式体验
- E) 其他(请描述)
问题 2 — 用户
谁会使用此界面?
- - A) 内部团队 / 运营
- B) 终端客户 / 消费者
- C) 商业客户 / B2B
- D) 构建者本人(测试/原型设计)
问题 3 — 基调与感受
此界面应传达何种感受?选择一或两个:
- - A) 专业且值得信赖
- B) 温暖且平易近人
- C) 大胆且充满活力
- D) 简约且专注
- E) 奢华且精致
- F) 俏皮且有趣
- G) 技术且精确
问题 4 — 视觉约束
您是否有品牌颜色、字体或现有的设计系统需要匹配?
- - A) 有 — 请分享(十六进制颜色代码、字体名称、Logo)
- B) 大致有 — 这里有一个参考网站或截图
- C) 没有 — 请给出您最好的创意方向
问题 5 — 技术约束
有任何技术要求吗?
- - A) 必须在 MindStudio 的 React 环境中工作(默认 — 始终假设此情况)
- B) 需要特定的 npm 包
- C) 必须匹配现有的组件库(shadcn、MUI 等)
- D) 除 MindStudio 兼容性外无其他约束
问题 6 — MindStudio 变量映射(必需)
这至关重要。在 MindStudio 中,用户填写的每个输入都会作为变量传递给代理工作流的其余部分。对于界面中的每个输入字段,我们需要知道其变量名称,以便组件能够正确连接它们。
询问用户:
让我们将您的输入映射到 MindStudio 变量。对于此界面中的每个字段,变量应如何命名?例如:topic、tone、keywords、content_type。列出每个字段及其变量名称。
如果用户不确定,请根据界面目的建议名称,并要求他们确认或调整。例如,对于 LinkedIn 帖子生成器:
tone |
| 帖子长度 | post_length |
| 关键词 | keywords |
| 内容格式 | content_type |
一旦确认,在整个组件中使用这些确切的变量名称。不要发明变量名称。不要使用像 input1 或 field_value 这样的通用名称。
变量连接模式
每个已确认的变量必须使用其确切的 MindStudio 变量名称捕获到组件状态中,并为工作流提供。使用此模式:
tsx
// 状态键与 MindStudio 变量名称完全匹配
const [formData, setFormData] = useState({
topic: ,
tone: ,
keywords: ,
content_type: [],
})
// 提交时 — 将所有变量传递给 MindStudio 工作流
const handleSubmit = () => {
// formData 中的每个键对应一个命名的 MindStudio 变量
// 工作流中的下游块可以引用这些变量
onSubmit(formData)
}
始终在组件顶部的代码注释中显示变量引用摘要,以便 MindStudio 构建者清楚界面生成了哪些变量:
tsx
/
* MindStudio 变量输出:
* - topic (string) — 用户的研究主题或想法
* - tone (string) — 选择的语气
* - keywords (string) — 逗号分隔的关键词
* - content_type (array) — 选择的内容格式
*/
探索之后
一旦您理解了要构建的内容,以 200-300 字的小节呈现设计计划。在继续每个小节之前进行检查。涵盖:
- 1. 美学方向及理由
- 组件结构和布局
- 数据流和状态管理
- 交互模式和动画
- 可访问性和边界情况
询问:这个方向感觉对吗?在我构建之前需要调整吗?
当存在权衡时,提出 2-3 种方法。首先给出您的建议并解释原因。无情地应用 YAGNI 原则 — 移除此特定界面不需要的功能。
阶段 2:美学方向 — 大胆承诺
一旦探索完成,锁定一个清晰的美学方向并精确执行。通用界面是容易被遗忘的。最好的 MindStudio 界面感觉像是量身定制的。
选择方向
致力于以下美学原型之一(或两者有意融合):
| 原型 | 特征 | 最适合 |
|---|
| 精致简约 | 手术般的留白,一种强调色,完美的排版 | SaaS、B2B、专业工具 |
| 奢华编辑 |
衬线展示,高对比度,宽裕的边距 | 作品集、高端服务、创意机构 |
|
暗黑技术 | 深色背景,等宽强调,霓虹高亮 | 开发者工具、AI 产品、金融科技 |
|
温暖平易 | 圆角,柔和调色板,友好字体 | 消费者应用、健康、教育 |
|
大胆粗野 | 原始网格,超大字体,鲜明对比 | 时尚、艺术、挑衅性品牌 |
|
玻璃拟态 | 磨砂面板,分层深度,柔和模糊 | 现代 SaaS、仪表盘、覆盖层 |
|
便当网格 | 基于卡片的密度,不同尺寸,有序混乱 | 仪表盘、功能展示 |
|
复古未来 | 扫描线,磷光发光,等宽字体 | AI 工具、技术演示、小众产品 |
|
粘土拟态 | 膨胀形状,柔和 3D,俏皮阴影 | 消费者应用、游戏、儿童工具 |
|
有机/自然 | 大地色调,纹理,流畅曲线 | 健康、食品、可持续性 |
关键规则:选择一个方向并完全投入。对任何风格的半心半意执行都比对其他风格的大胆执行更糟糕。关键在于有意图性。
什么使界面令人难忘
在编码之前,回答:用户会记住此界面的一件事是什么?它可能是一个字体选择、一个进入动画、一个意想不到的颜色、一个提交时的微交互。识别它。然后构建所有其他内容来支持它。
阶段 3:设计系统 — 先构建再编码
在编写组件之前建立这些设计令牌。将它们存储为 CSS 变量或 Tailwind 配置扩展。
排版
将独特的展示字体与精致的正文字体配对。切勿默认使用 Inter、Roboto、Arial 或系统 UI 字体作为主要选择。
按原型的示例配对:
| 原型 | 展示字体 | 正文字体 |
|---|
| 奢华编辑 | Playfair Display, Cormorant Garamond | Lora, EB Garamond |
| 大胆粗野 |
Anton, Bebas Neue | IBM Plex Mono, Space Mono |
| 暗黑技术 | Syne, Oxanium | JetBrains Mono, Fira Code |
| 温暖平易 | Nunito, Quicksand | Source Sans Pro, DM Sans |
| 精致简约 | Fraunces, Libre Baskerville | Figtree, Plus Jakarta Sans |
| 玻璃拟态 | Outfit, Syne | Manrope, DM Sans |
规则:
- - 正文 line-height:1.5-1.75
- 可读文本的 line-length:65-75 个字符(ch 单位)
- 移动端正文文本最小 16px
- 缩放比例:xs/sm/base/lg/xl/2xl/3xl/4xl — 切勿使用任意尺寸
颜色系统
致力于一个具有清晰角色的调色板。每种颜色必须有用途。
css
:root {
/ 品牌 /
--color-primary: / 您的主导品牌颜色 /;
--color-primary-hover: /*