better-ui
Design engineering principles for making interfaces feel polished. Use when building UI components, reviewing frontend code, implementing animations, hover states, shadows, borders, micro-interactions, enter/exit animations, or any visual detail work. Triggers on UI polish, design details, "make it feel better", "feels off", stagger animations, border radius, optical alignment, image outlines, box shadows.
Install
npx skills add https://github.com/jakubkrehel/skills --skill better-uiEnter and exit animations
Recipes for staged entrances and the exits that follow them. For interactive state feedback see animations.md [blocked], and for icon swaps see icon-transitions.md [blocked].
Enter animations
- Split into semantic groups such as title, description and actions.
- Stagger the groups
100msapart. - Split a short display headline into words, staggered
80msapart, where it should read word by word. - Combine
opacity,blurandtranslateYfor each group's enter.
Motion
CSS
The hidden state lives in the from keyframe, so an item whose animation never runs stays visible. Reduced motion keeps only the opacity keyframe.
Entering from display: none
A popover, dialog or element toggled from display: none has no previous style to transition from. @starting-style supplies one, and transition-behavior: allow-discrete keeps it rendered through the exit. The open state's duration applies on enter and the closed state's on exit.
@starting-style and discrete display transitions are Baseline 2024. overlay is Chromium only, and browsers without support show and hide instantly.
Exit animations
Subtle exit
Full exit
Slide fully out only where the destination carries meaning, such as a card returning to a list or a drawer closing: