better-ui

Reviews and polishes UI code for border radius, shadows, icon transitions, and animation details.

Updated Sep 5, 2023
One-click install
npx skills add https://github.com/eyenalxai/dotfiles --skill better-ui-eyenalxai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: better-ui
Source: https://github.com/eyenalxai/dotfiles/tree/main/.agents/skills/better-ui
Command: npx skills add https://github.com/eyenalxai/dotfiles --skill better-ui-eyenalxai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Interfaces often feel subtly off because of small compounding details: mismatched nested border radii, geometrically centered icons that look unbalanced, theme switches that smear, and animations that cannot be interrupted. This Skill provides exact, opinionated values and recipes to find and fix those polish issues in UI code. ## Core Features & Use Cases - Surface and radius rules: Enforces concentric border radius (outer = inner + padding), layered box-shadows instead of depth borders, and pure black/white image outlines per theme. - Animation recipes: Prescribes interruptible CSS transitions, scale(0.96) press feedback, staggered enter animations, subtle exits, and contextual icon cross-fades with exact values for Motion, Framer Motion, or plain CSS. - Icon and performance guidance: Matches icon stroke width to text weight, uses one SVG recolored per state, restricts transition-property to exact properties, and limits will-change to GPU-compositable properties. - Use Case: Ask the Skill to review a React/Tailwind component library before release; it reports findings grouped by principle with severity, file locations, before/after fixes, and a Block or Approve verdict. ## Quick Start Review the UI components in this project for polish issues and report findings with severity and fixes.

Frequently Asked Questions about better-ui

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix mismatched border radius on nested elements?

Set the outer radius equal to the inner radius plus the padding between them. For example, a card with 8px padding and a 12px inner radius needs a 20px outer radius. Past 24px of padding, treat layers as separate surfaces.

How to animate icon changes with Framer Motion?

Use AnimatePresence with a keyed motion element, animating opacity 0 to 1, scale 0.25 to 1, and blur 4px to 0px. Set the transition to a spring with duration 0.3 and bounce 0, and import from the package already in package.json.

Should I use CSS transitions or keyframe animations for interactive elements?

Use CSS transitions for interactive state changes because they can be interrupted and retargeted mid-animation. Reserve keyframe animations for staged one-shot sequences like enter animations, since they restart from the beginning when retriggered.

Why does my theme toggle animate the whole page?

A theme flip changes color, background, border, and shadow on many elements at once, so every transition fires together and smears. Inject a stylesheet disabling all transitions, force a reflow, then remove it on the next frame.

When should I use will-change in CSS animations?

Add will-change only for transform, opacity, or filter when you observe first-frame stutter, since only those properties are GPU-compositable. Never use will-change: all or apply it preemptively, because each compositing layer costs memory.

What topics does this UI polish guidance not cover?

Text wrapping, font rendering, and tabular numbers belong to better-typography; hit areas, focus, ARIA, and reduced motion belong to better-accessibility; grouping, breakpoints, and spatial RTL belong to better-layout.