惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
The GitHub Blog
The GitHub Blog
博客园_首页
T
The Blog of Author Tim Ferriss
H
Hackread – Cybersecurity News, Data Breaches, AI and More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
腾讯CDC
I
InfoQ
量子位
J
Java Code Geeks
P
Proofpoint News Feed
有赞技术团队
有赞技术团队
Webroot Blog
Webroot Blog
Martin Fowler
Martin Fowler
D
Docker
F
Fortinet All Blogs
云风的 BLOG
云风的 BLOG
V
Vulnerabilities – Threatpost
罗磊的独立博客
P
Proofpoint News Feed
T
The Exploit Database - CXSecurity.com
Cyberwarzone
Cyberwarzone
P
Privacy & Cybersecurity Law Blog
Last Week in AI
Last Week in AI
爱范儿
爱范儿
The Hacker News
The Hacker News
S
SegmentFault 最新的问题
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
V
V2EX
Simon Willison's Weblog
Simon Willison's Weblog
AI
AI
Y
Y Combinator Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
GbyAI
GbyAI
V
Visual Studio Blog
H
Heimdal Security Blog
S
Secure Thoughts
B
Blog RSS Feed
雷峰网
雷峰网
T
Tenable Blog
C
Check Point Blog
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
A
About on SuperTechFans
Recent Commits to openclaw:main
Recent Commits to openclaw:main

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Why AI-Generated UIs Look 'Off' — and the One Principle That Fixes It
@kiwibreaksme · 2026-06-16 · via DEV Community

You've seen it. You ask an AI to build a dashboard, and it returns something that's… fine? Every component is individually competent. The button is a button. The card is a card. And yet the whole thing reads as generated — like a stock photo of a UI.

For a long time I assumed the fix was "better components" or "more taste in the prompt." It isn't. After digging through the actual design literature — Refactoring UI, Material Design 3, Apple's HIG, IBM Carbon, WCAG, the Financial Times' visual vocabulary — the real culprit has a name:

Incoherence.

The parts don't agree with each other. And once you can see it, you can't unsee it.

I've written before about why your vibe-coded app looks ugly and what I did about it. This post goes underneath that — the actual mechanism behind the "off" feeling, and the one principle that fixes it.


The tell: parts that don't agree

Here's a UI with nothing "wrong" in it:

  • A card with sharp 2px corners
  • Pill-shaped buttons inside it
  • A blue primary action next to a purple "upgrade" link
  • Icons: two from Lucide (outline), one filled emoji
  • One shadow lit from the top-left, another from straight below

Every one of those choices is defensible in isolation. Together, they signal "assembled from parts," because a human designer would never make all of them on the same screen. A designer picks one corner style, one accent, one icon set, one light source — and repeats those decisions everywhere.

That repetition is what we read as "designed by one mind." Goran Paun (UX Collective) calls it visual coherence; Steve Schoger's whole Refactoring UI is, in a sense, a book about not introducing gratuitous variation. The principle is old. What's new is that AI breaks it by default, and understanding why tells you how to fix it.


Why AI specifically struggles with this

A language model generates UI locally. It writes the card, then the button, then the modal — each as a fresh, plausible snippet. It has no running memory that "the buttons 40 lines up were pill-shaped, so these must be too." Each component regresses to the mean of its training data, and the mean of "a button" and the mean of "a card" were never coordinated.

Humans don't work this way. We carry a tiny set of decisions in our head — this product is soft-cornered, blue-accented, 8px-grid — and every new element inherits them. The decisions are sticky.

So the fix isn't "make the model more tasteful." It's: write the sticky decisions down, and tell the model to copy them instead of inventing new ones.


The meta-law: one choice per axis

Here's the whole idea in one sentence:

For each design axis, pick exactly one value or family, encode it as a token, and apply it everywhere.

Coherence is not "every screen is identical." It's that the same decisions recur. A settings page and a dashboard can look very different and still feel like one product — as long as they share a radius personality, a shadow language, an accent, and a spacing unit.

These are the axes that have to stay unified:

Axis Pick ONE, system-wide Failure mode when mixed
Corner / radius sharp 0–4px · soft 8–12px · pill 9999px sharp dialog + rounded buttons = "two products glued together"
Shadow one scale, one light source (above-left), one tint "a scene with two suns"
Accent color one accent for emphasis (+ semantic red/green/amber) nothing reads as the action
Spacing unit one 8px grid (4px half-step) off-grid 7/13/19px reads as "sloppy"
Icon style one family, one fill mode, one stroke weight mixing sets looks "out of place"
Type scale one modular scale, ≤2 families arbitrary sizes destroy rhythm
Motion one duration set + one easing family some snappy, some sluggish = different apps
Control height shared height set (e.g. 40px) a 44px input beside a 32px button breaks the baseline

The single best instinct I've heard a non-designer voice it as:

"If the corners are sharp, everything should be sharp."

Exactly right — and it generalizes to every row in that table. Treat a mixed axis as a lint error, not a style choice.

Every decision in a StyleSeed UI tied to the rule behind it — numbers 2:1, one accent, content in cards, one corner radius.

Let's make four of these concrete.


1. Pick one corner personality (and respect the nesting law)

First, radius is a token, never a magic number. Define a small scale and reference it everywhere:

:root {
  --radius-sm: 8px;   /* inputs, buttons   */
  --radius-md: 12px;  /* cards, menus      */
  --radius-lg: 16px;  /* modals, sheets    */
  --radius-full: 9999px;
}

Then pick one personality — all sharp, all soft, or all pill — and apply it across card / button / input / modal / image. Don't let the model freestyle a rounded-none panel with rounded-full buttons.

There's a subtle second rule most people miss: nested radii must share a center. When a rounded element sits inside a rounded container with padding, the inner radius should be smaller:

inner radius = outer radius − padding

.card {
  --pad: 16px;
  border-radius: var(--radius-lg);          /* 16px */
  padding: var(--pad);
}
.card > .thumbnail {
  /* 16 − 16 = 0; clamp so it never goes negative */
  border-radius: max(0px, calc(var(--radius-lg) - var(--pad)));
}

If you give the inner element the same radius as the outer one, its corner visibly bulges past the container's arc. Apple's new "Liquid Glass" system formalizes exactly this concentric-corner math; Cloud Four has the canonical write-up.


2. Layered shadows from a single light source

The fastest way to make depth look fake is one hard box-shadow. Real shadows are a gradient (a penumbra), so stack several low-opacity layers, and — critically — tint them toward the surface hue instead of using pure black, which goes muddy:

/* card — sits near the page */
--shadow-md:
  0 1px 2px  hsl(220 40% 20% / 0.08),
  0 2px 4px  hsl(220 40% 20% / 0.08),
  0 4px 8px  hsl(220 40% 20% / 0.08);

/* modal — floats toward the user */
--shadow-xl:
  0 2px 4px   hsl(220 40% 20% / 0.06),
  0 8px 16px  hsl(220 40% 20% / 0.06),
  0 16px 32px hsl(220 40% 20% / 0.06),
  0 32px 64px hsl(220 40% 20% / 0.06);

The coherence rule: one light direction for the whole page (convention: above and slightly left), with vertical offset roughly 2× the horizontal. As elevation rises, offset and blur go up while opacity goes down. A card and a modal then read as the same light hitting objects at different heights — not two unrelated effects. (Josh Comeau and Tobias Ahlin both have excellent deep-dives on this.)

In dark mode, shadows nearly vanish, so switch to tonal elevation — lighter surfaces for higher elevation — and never use pure #000 as your base (Material recommends #121212 with white overlays per level).


3. One accent, everything else greyscale

Most "AI rainbow" UIs come from reaching for a new hue every time something needs emphasis. The discipline:

  • One accent for interactive emphasis.
  • A full tinted-grey ramp (not pure grey — nudge it 5–15% toward the brand hue) for text, surfaces, and borders.
  • Only four semantic colors — success / warning / error / info — used strictly by meaning, never decoration.
:root {
  --accent: #5b5bd6;
  /* greys tinted slightly toward the accent's hue, not 0-saturation */
  --grey-50:  hsl(240 20% 98%);
  --grey-200: hsl(240 14% 90%);
  --grey-500: hsl(240 8%  55%);
  --grey-900: hsl(240 12% 14%);  /* body text — NOT #000 */
}

And one accessibility floor you don't get to negotiate (WCAG 2.2 AA): 4.5:1 contrast for body text, 3:1 for large text and UI components. Never convey information by color alone — pair it with an icon, text, or shape. A red border on an invalid field is not enough; add the icon and the message.


4. One spacing grid, with proximity doing the grouping

Snap every margin, padding, and gap to a single scale — 4, 8, 12, 16, 24, 32, 48, 64 — and let proximity carry meaning. The rule from Gestalt (and Refactoring UI's "avoid ambiguous spacing"): the space around a group must be clearly larger than the space within it.

A concrete ladder for forms:

label → input        : 4–8px
input → input         : 12–16px
group → group (section): 24–32px

When everything is evenly spaced, the eye can't tell what belongs together. The doubling at each level is what makes a label bind to its field and a section separate from the next.


Make the machine check itself

Writing the decisions down is half the battle; the other half is catching violations. This is where AI can actually help — if you give it the rubric.

I bake all of the above into an open-source design engine (StyleSeed) that Claude Code and Cursor read automatically, but the idea is tool-agnostic. The most useful piece turned out to be a coherence grader: a check that scores a file and flags mixed axes as real deductions.

A trimmed example of what that output looks like:

## Design Score: 70 / 100   (Dashboard.tsx)

Color discipline   13/18  ▓▓▓░  #000 headings; 3 accent hues
Cards & elevation   8/12  ▓▓░░  1px borders doing separation
Coherence           6/12  ▓▓░░  sharp cards (l.22) + pill buttons (l.48); 3 accents

### Fix first (highest score gain)
1. Unify radius (pick soft 8–12px) + collapse to one accent  → +9
2. Add empty + loading states to the orders list            → +7
3. Drop 1px borders, use tone + ≤8% shadow                  → +4

The "Coherence" category is the one that most predicts "looks AI-generated," precisely because it measures system-wide consistency rather than per-component prettiness. A component can be beautiful and still wrong — if it disagrees with its neighbors.


The takeaway

If you remember one thing:

Beautiful parts don't make a beautiful UI. Agreeing parts do.

Pick one value per axis — radius, shadow, accent, spacing, icons, type, motion — write it down as a token, and make every new element inherit it instead of inventing a fresh choice. That single discipline is the difference between "a robot made this" and "a designer made this," and it's the cheapest, highest-leverage thing you can do for an AI-built interface.

The corners are sharp? Then everything is sharp. All the way down.


Want the practical side? I covered the one-file fix that makes your vibe-coded app stop looking ugly in a companion post. And the full research-backed version — concrete spacing numbers, a type recipe per app type, layered-shadow and nested-radius recipes, all grounded in Refactoring UI / Material 3 / Apple HIG / WCAG — is open source (MIT): github.com/bitjaru/styleseed. A ⭐ helps more devs (and more AI tools) find it.