跳到正文
Skillpedia
界面(UI/UX)10k · #11889

better-ui

它能做什么

这个技能为界面添加收尾细节,例如圆角、阴影、图标状态和动画。适合希望外观精致、统一的设计师和开发者。

适用场景

  • ✓当卡片、按钮或嵌套的表面在圆角处看起来不均匀的时候。
  • ✓当图标或动画感觉不对或不统一的时候。
  • ✓当你想检查界面的收尾细节的时候。

技能链接

https://github.com/jakubkrehel/skills/blob/main/skills/better-ui/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/jakubkrehel/skills/blob/main/skills/better-ui/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我的卡片和按钮看起来不整齐,而且菜单动画感觉太慢。请打磨界面的细节。”

每周 5 个新技能,1 分钟读完。

工作原理

AI 会为圆角、阴影、图标对齐和动画时长应用精确的数值,并与项目的组件和令牌相匹配。只有在底层交互本身正确之后,它才会进行打磨。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

UI polish

This skill holds the visual polish for surfaces, icons and motion, with the exact value each detail takes. It applies once the underlying interaction is sound, and a polish finding never outranks a broken interaction.

Exact values, optional polish

The values below are exact, not ranges to approximate. cubic-bezier(0.2, 0, 0, 1) is not cubic-bezier(0.4, 0, 0.2, 1), and 0.96 is not 0.95. The optical nudges and the concentric padding cutoff are the exceptions. They are starting points, judged by eye.

Keep the project's component library, tokens and density, and match its motion language wherever no rule here gives a value. A deliberate and consistent project convention, such as a style with no shadows, is a preference and not a finding. The same detail done two ways within the project is a finding.

Text wrapping, font rendering, tabular numbers and text spacing belong to better-typography. Hit areas, keyboard support, ARIA and the reduced-motion requirement belong to better-accessibility. Grouping, section spacing, breakpoints and spatial RTL belong to better-layout, except directional icon mirroring. Color tokens and contrast measurement belong to better-colors.

Outer radius equals inner radius plus padding

Where nested surfaces share a visible, even inset, the outer radius is the inner radius plus the padding plus any border width. Past 24px of padding, or where the padding is deliberately asymmetric, treat the layers as separate surfaces and keep each one's radius token. Recipes are in surfaces.md.

Align optically where geometry looks off

Where geometric centering looks off, nudge by eye. Give a button 2px less padding on its icon side, shift a play triangle toward its point and fix asymmetric glyphs in the SVG itself. Recipes are in surfaces.md.

Shadows for elevation, borders for structure

Where a border exists only to create depth, replace it with layered transparent box-shadow values. Keep borders on dividers, separators, table cells and selected states. Keep them on form inputs too, whose boundary needs 3:1 non-text contrast under better-accessibility. Focus rings belong to better-accessibility as well.

Forced-colors mode removes every box-shadow. Keep border: 1px solid transparent under a shadow ring so that mode still draws an edge. Recipes are in surfaces.md.

Outline images in pure black or white

Give content images a 1px outline inset by 1px. Use oklch(0 0 0 / 0.1) in light mode and oklch(1 0 0 / 0.1) in dark. Never use a palette near-black, a tinted neutral or the accent color, because the tint shows as a colored fringe on the image edge. Skip transparent artwork such as logos and illustrations. The recipe is in surfaces.md.

Transitions, not keyframes, for interactive state

Drive interactive state changes with CSS transitions or a motion library's springs, which retarget when the user reverses mid-flight. Keyframes run a fixed timeline and cannot reverse, so reserve them for sequences that run once. See animations.md.

Press scales to 0.96

A pressed button scales to 0.96 over 150ms with ease-out, and a disabled one never scales. Give the button an opt-out where the motion would distract, through the component's existing variant API or a static prop. See recipes for CSS, Tailwind and Motion.

High-frequency interactions respond instantly

Keystrokes, row hovers and tab switches get instant feedback, or a transition of 150ms or less on opacity or background-color. Reserve expressive motion for infrequent moments such as a view's first load, a success state or an empty state.

Every animated state change also leaves a static cue in the form of a color, icon or label. Motion is never the only feedback channel.

Gate motion behind the reduced-motion preference

better-accessibility owns the requirement, and no recipe here ships without it. Run movement, scale and blur only under prefers-reduced-motion: no-preference. Under reduced motion, replace them with an opacity cross-fade rather than removing the element instantly. Recipes for CSS, Tailwind and Motion are in animations.md.

Stagger infrequent entrances by 100ms

Where sequence communicates hierarchy in a staged entrance, split the content into semant

常见问题

它会改变我的设计风格吗?

不会。一致的风格选择,例如不使用阴影,会被当作项目偏好而予以尊重。

它会处理动画的无障碍问题吗?

减少动效的需求属于无障碍技能的职责范围,本技能会指向该技能。

这些数值是固定的吗?

大多数数值是精确的,只有少数光学调整需要凭视觉判断。

详情

作者的原始描述

Polishes surfaces, icons and motion with exact values for border radius, optical alignment, shadows, icon states and animation.

repo: jakubkrehel/skills

热度

GitHub 星标
10k
排名
#11889
许可证
MIT
更新时间
2026/11/1

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能