Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Living wiki of UI design patterns and best practices built with Fumadocs, Next.js, and Base UI components.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
rules/_sections.md
1# Sections23This file defines all sections, their ordering, impact levels, and descriptions.4The section ID (in parentheses) is the filename prefix used to group rules.56---78## 1. Animation Principles (timing, physics, staging)910**Impact:** CRITICAL11**Description:** Disney's 12 principles adapted for web. Timing, physics, and staging rules ensure animations feel natural and purposeful. Violations here produce the most noticeable quality issues.1213## 2. Timing Functions (spring, easing, duration, none)1415**Impact:** HIGH16**Description:** Choosing the right timing function—spring, easing curve, or no animation—based on whether motion is user-driven, system-driven, or high-frequency.1718## 3. Exit Animations (exit, presence, mode, nested)1920**Impact:** HIGH21**Description:** AnimatePresence and exit animation patterns in Motion/Framer Motion. Correct usage prevents layout shifts, stale interactions, and orphaned elements.2223## 4. CSS Pseudo Elements (pseudo, transition, native)2425**Impact:** MEDIUM26**Description:** Leveraging ::before, ::after, View Transitions API, and native pseudo-elements (::backdrop, ::placeholder, ::selection) to reduce DOM nodes and improve transitions.2728## 5. Audio Feedback (a11y, appropriate, impl, weight)2930**Impact:** MEDIUM31**Description:** When and how to use sound in UI. Covers accessibility, appropriateness heuristics, implementation patterns, and matching sound weight to action importance.3233## 6. Sound Synthesis (context, envelope, design, param)3435**Impact:** MEDIUM36**Description:** Web Audio API best practices for procedural sound generation. Covers AudioContext management, envelope shaping, sound design patterns, and parameter ranges.3738## 7. Morphing Icons (morphing)3940**Impact:** LOW41**Description:** Building icon components that morph between any two icons through SVG line transformation. All icons share a 3-line structure enabling seamless transitions.4243## 8. Container Animation (container)4445**Impact:** MEDIUM46**Description:** Animating container width and height using a measure-and-animate pattern with ResizeObserver and Motion. The two-div pattern separates measurement from animation to avoid feedback loops.4748## 9. Laws of UX (ux)4950**Impact:** HIGH51**Description:** Psychological principles behind interfaces that feel right. Covers Fitts's Law (target sizing), Hick's Law (choice reduction), Miller's Law (chunking), Doherty Threshold (response time), and Postel's Law (input tolerance).5253## 10. Predictive Prefetching (prefetch)5455**Impact:** MEDIUM56**Description:** Loading content before the user clicks by analyzing cursor trajectory, reducing perceived latency by 100-200ms. Covers trajectory vs hover vs click strategies and device-aware fallbacks.5758## 11. Typography (type)5960**Impact:** MEDIUM61**Description:** CSS font and text properties most developers overlook. OpenType features, numeric variants, variable font axes, text rendering, wrapping, and decoration controls that make typography feel considered.6263## 12. Visual Design (visual)6465**Impact:** HIGH66**Description:** CSS design fundamentals that compound into visual polish. Concentric border radius, layered shadows, consistent spacing scales, and alpha borders. Small details that separate considered interfaces from default ones.67