10 Things Even AI Can't Do in Frontend Development (At Least Not on Its Own)
本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。
10 Things Even AI Can’t Do in Frontend Development (At Least Not on Its Own)
AI can build a React component, generate a landing page, write CSS, connect an API, and even create an entire frontend from a short description. A few years ago, getting that much code generated automatically would have sounded unrealistic. Today, it’s part of a normal development workflow. But here’s something worth remembering: generating a working interface and building a good user experience are two very different things. An AI-generated page might look impressive in a screenshot. Open it, resize the browser, navigate with a keyboard, test it on a slower connection, or use it with real content. That’s usually when the missing details start to appear. I’ve been thinking about this from a frontend developer’s perspective. AI is becoming a useful part of the job, but there are still areas where generated code needs human judgment, experience, and a proper review process. Here are ten of them.
人工智能可以构建 React 组件、生成落地页、编写 CSS、连接 API,甚至仅凭简短的描述就能创建一个完整的前端。几年前,自动生成如此多的代码听起来还很不现实。如今,这已成为常规开发工作流程的一部分。但有一点值得铭记:生成一个可用的界面与构建良好的用户体验是两码事。AI 生成的页面在截图中可能看起来令人印象深刻。但当你打开它、调整浏览器大小、使用键盘导航、在较慢的网络环境下测试,或使用真实内容进行交互时,缺失的细节通常就会显现出来。我一直从前端开发者的角度思考这个问题。AI 正成为工作中很有用的部分,但在某些领域,生成的代码仍然需要人类的判断、经验和适当的审查流程。以下是其中的十个方面。
1. Understand What the User Actually Needs
AI is very good at following instructions. The problem is that users don’t always know how to describe what they need. A product owner might ask for a dashboard with five charts, three filters, and a sidebar. AI can generate that layout without much trouble. But does the dashboard actually help anyone make a decision? Maybe users only need two important metrics. Maybe the filters are unnecessary. Maybe the information should be organized around tasks rather than categories. These are product decisions, not coding problems. A frontend developer needs to understand the reason behind a feature before deciding how to implement it. That includes business goals, user behavior, accessibility needs, and the context in which the interface will be used. AI can suggest solutions based on the information it receives. It cannot reliably discover missing requirements or know which assumptions are wrong without additional evidence. The difference: AI can implement a requested feature. Understanding whether that feature should exist in the first place requires product thinking.
1. 理解用户真正的需求
AI 非常擅长遵循指令。问题在于,用户并不总是知道如何描述他们的需求。产品负责人可能会要求一个包含五个图表、三个筛选器和一个侧边栏的仪表板。AI 可以毫不费力地生成该布局。但这个仪表板真的能帮助任何人做出决策吗?也许用户只需要两个重要的指标。也许筛选器是不必要的。也许信息应该围绕任务而不是类别来组织。这些是产品决策,而不是编码问题。前端开发者在决定如何实现功能之前,需要理解其背后的原因。这包括业务目标、用户行为、无障碍需求以及界面使用的上下文。AI 可以根据接收到的信息建议解决方案,但在没有额外证据的情况下,它无法可靠地发现缺失的需求或判断哪些假设是错误的。区别在于:AI 可以实现所请求的功能,而理解该功能是否应该存在,则需要产品思维。
2. Create a Distinctive Design, Not Just Another Familiar Interface
There is a reason so many AI-generated dashboards and landing pages look similar. The same gradients, rounded cards, purple buttons, oversized headings, and familiar layouts appear again and again. These patterns aren’t necessarily bad. In fact, many are perfectly reasonable design choices. The problem starts when every product ends up looking like a variation of the same template. A good interface needs more than visual consistency. It needs an identity. A developer working with a designer considers questions that are difficult to reduce to a prompt: What should users notice first? Which elements deserve visual emphasis? Does the design communicate the personality of the product? Is the layout appropriate for the audience? Does the interface feel different for a meaningful reason? A 2026 study comparing AI-generated and human-created interface prototypes found that participants could evaluate generated interfaces positively on practical usability dimensions, while the more experience-oriented dimensions, such as originality and innovation, were less convincing. It’s one study, not a universal verdict, but it illustrates an important distinction. Read the study: Usable but Conventional — An Empirical Study on the UX of AI-Generated Interface Prototypes. AI can give you a good starting point. Turning that starting point into a recognizable product experience takes design direction.
2. 创造独特的设计,而非千篇一律的界面
许多 AI 生成的仪表板和落地页看起来相似是有原因的。同样的渐变、圆角卡片、紫色按钮、超大标题和熟悉的布局反复出现。这些模式本身并不坏,事实上,许多都是非常合理的设计选择。问题在于,当每个产品最终看起来都像是同一个模板的变体时。一个好的界面需要的不仅仅是视觉一致性,它还需要个性。与设计师合作的开发者会考虑那些难以简化为提示词的问题:用户应该首先注意到什么?哪些元素值得视觉强调?设计是否传达了产品的个性?布局是否适合目标受众?界面是否因有意义的原因而显得与众不同?2026 年一项对比 AI 生成与人类创作界面原型的研究发现,参与者对生成式界面在实用性维度上的评价尚可,但在原创性和创新性等更注重体验的维度上则不太令人信服。这只是一项研究,并非普遍结论,但它阐明了一个重要的区别。阅读研究:《可用但传统——关于 AI 生成界面原型用户体验的实证研究》。AI 可以为你提供一个良好的起点,但要将该起点转化为可识别的产品体验,则需要设计指导。
3. Make Animations Feel Natural
Animations are easy to underestimate. A button changes color. A modal appears. A card moves into place. Technically, everything works. But good motion design is not simply about making elements move. It communicates relationships, provides feedback, and helps users understand changes in the interface. AI-generated code often starts with generic transitions. That is fine for a prototype, but applying the same duration and easing curve to every interaction can make an application feel mechanical. Consider the difference between a quick button response and a page transition. They shouldn’t necessarily have the same timing or visual weight. Performance is another part of the problem. Animating layout-heavy properties such as width, height, or position can cause additional layout work. Sometimes a transform-based animation is a better choice. There is also a simple accessibility detail that should not be forgotten:
.card { transition: transform 220ms ease; }
.card:hover { transform: translateY(-4px); }
@media (prefers-reduced-motion: reduce) {
.card { transition: none; }
.card:hover { transform: none; }
}
The prefers-reduced-motion media query lets the interface respect users who have enabled reduced motion in their operating system. The goal isn’t to remove every animation. It’s to make sure that unnecessary movement doesn’t get in the way. The difference: AI can generate transitions. Deciding how motion should communicate an interaction, remain performant, and respect user preferences takes more than generating CSS. Reference: MDN — prefers-reduced-motion.
3. 让动画感觉自然
动画很容易被低估。按钮变色、模态框弹出、卡片移动到位,从技术上讲,一切都能运行。但优秀的动效设计不仅仅是让元素动起来,它还能传达逻辑关系、提供反馈,并帮助用户理解界面的变化。AI 生成的代码通常使用通用的过渡效果。这对于原型来说没问题,但如果将相同的持续时间和缓动曲线应用于每一次交互,会使应用程序显得机械化。考虑一下快速按钮响应与页面过渡之间的区别,它们不一定需要相同的时机或视觉权重。性能是另一个问题,对宽度、高度或位置等重布局属性进行动画处理可能会导致额外的布局开销,有时基于 transform 的动画是更好的选择。此外,还有一个不应忘记的简单无障碍细节(见代码块)。prefers-reduced-motion 媒体查询可以让界面尊重那些在操作系统中启用了“减少动画”设置的用户。目标不是移除所有动画,而是确保不必要的移动不会造成干扰。区别在于:AI 可以生成过渡效果,而决定动效如何传达交互、保持性能并尊重用户偏好,需要的不仅仅是生成 CSS。参考:MDN — prefers-reduced-motion。
4. Personalize an Experience Without Making It Feel Intrusive
Personalization is one of the most interesting areas of modern frontend development. An application can recommend content, remember preferences, adapt its interface, and respond to previous interactions. AI can help implement these features, but there is a subtle problem: more personalization does not automatically mean a better experience. Imagine a fitness application that recommends a difficult workout because the user hasn’t exercised recently. That recommendation might be based on real activity data. But perhaps the user is recovering from an injury, travelling, or simply taking a planned break. The application has information, but it doesn’t necessarily have enough context to make a useful decision. Personalization should have a clear purpose. It should solve a problem rather than demonstrate how much inform
4. 个性化体验,而非造成侵入感
个性化是现代前端开发中最有趣的领域之一。应用程序可以推荐内容、记住偏好、调整界面并响应之前的交互。AI 可以帮助实现这些功能,但存在一个微妙的问题:更多的个性化并不自动意味着更好的体验。想象一个健身应用程序,因为它发现用户最近没有锻炼,就推荐了一项高难度训练。该推荐可能基于真实的活动数据,但用户可能正在从伤病中恢复、正在旅行,或者只是在进行计划内的休息。应用程序拥有信息,但并不一定拥有足够的上下文来做出有用的决策。个性化应该有明确的目的,它应该解决问题,而不是仅仅展示它掌握了多少信息。