Interaction Lab — AI-Native UI/UX Skill
Never invent generic transition: all 0.5s ease animations from scratch. Whenever you design or build an interactive UI element, consult Interaction Lab first to retrieve exact motion tokens, explicit state machines, anti-pattern guardrails (DO NOT), and verified reference code.
Mandatory 3-Step Workflow
Step 1 — Browse by Category or Search by UI Symptom
Run the ilab CLI (or curl the server directly if ilab is not installed):
# List the 6 interaction intent categories
ilab categories
# List patterns inside a specific category
ilab list feedback-receipts
ilab list direct-manipulation
ilab list navigation-focus
ilab list scroll-rhythm
ilab list spatial-hierarchy
ilab list surface-optics
# Search by Chinese or English symptom / component name
ilab search "按钮没反馈"
ilab search "毛玻璃拖拽"
ilab search "3D 透视"
ilab search "skeleton"
(HTTP fallback if CLI is unavailable: curl -s $ILAB_URL/llms.txt, curl -s $ILAB_URL/api/categories, curl -s "$ILAB_URL/api/search?q=...")
Step 2 — Pull the Exact Blueprint
Once you select the best matching <slug>, fetch its complete engineering blueprint:
# Fetch Token Contract + State Machine + DO NOT Guardrails + Minimal Runnable Skeleton + Self-Check
ilab get <slug>
# Optional: fetch the full high-craft standalone visual reference HTML
ilab get <slug> --raw-html
(HTTP fallback: curl -s $ILAB_URL/patterns/<slug>.md or $ILAB_URL/specimens/<slug>.html)
Step 3 — Implement Without Cutting Corners
- Copy the exact CSS Token Contract verbatim (timings,
cubic-bezier(...)curves, scale ratios, blur radii). Do NOT degrade them to genericeaseor0.5s. - Implement EVERY state in the State Machine table (
idle,pressed,sending,done,hover,yield, etc.), including re-entry locks where specified. - Obey EVERY
DO NOTguardrail listed in the blueprint. - Apply universal motion hygiene:
- Animate only GPU-composited properties (
transform,opacity,stroke-dashoffset, color). Never animatewidth,height,top,left, ormargin. - Always set
font-variant-numeric: tabular-numson dynamic numbers, counters, prices, and dates. - Always include
@media (prefers-reduced-motion: reduce)fallbacks.
- Animate only GPU-composited properties (
- Run the blueprint's Self-Check checklist before finalizing your response.