anim
БесплатноБез исполняемых скриптовНе проверенCore's motion contract: shared easing, duration, stagger, and scale tokens; press/hover utilities; motion/react import rules; route view transitions; tooltip…
от Asymmetric-al★ 354 звезды на GitHubОб этом скилле
Core motion contract
Use this skill for the repository's operative motion rules. For animation
craft (timing, easing, choreography, when not to animate), load
docs/ai/skills/emil-design-engineering/SKILL.md first. For motion/react
API details, use the motion skill.
Workflow
- Decide what the motion communicates (feedback, hierarchy, spatial continuity). If it is decoration, leave it out.
- Use the shared tokens, utilities, and presets below instead of raw durations, curves, or scales.
- Animate
transformandopacity; entrances ease out, exits ease in and run faster than entrances. - Define reduced-motion behavior and check the route view-transition rules when the element sits inside an app shell.
- Run
node scripts/check-motion-patterns.mjs <files>on changed files;tests/unit/motion-contract.test.tsguards the banned class patterns.
Two synchronized halves
- CSS tokens in
packages/ui/styles/globals.css(:root) — the baseline for Tailwind, Base UI surfaces, and global CSS. - TS constants in
packages/lib/motion-presets.ts(@asym/lib/motion-presets) — the pair formotion/reactand shared helpers. Prefer these over raw literals.
When updating one half, update the other.
CSS tokens (packages/ui/styles/globals.css :root)
/* Easing */
--ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
--ease-in-soft: cubic-bezier(0.4, 0, 1, 1);
--ease-in-out-soft: cubic-bezier(0.77, 0, 0.175, 1);
--ease-drawer: cubic-bezier(0.32, 0.72, 0, 1); /* iOS curve */
/* Duration tiers — product UI stays under 300ms unless ceremonial */
--duration-press: 120ms; /* button/tile press feedback */
--duration-micro: 150ms; /* hover, color change */
--duration-standard: 220ms; /* tooltip, popover, dropdown, select */
--duration-modal: 220ms; /* dialog open/close */
--duration-drawer: 320ms; /* sheet / vaul drawer */
--duration-route: 240ms; /* matches asym-vt-route-* */
--duration-shared: 280ms; /* matches asym-vt-share-* */
/* Stagger */
--stagger-tight: 45ms;
--stagger-medium: 60ms;
/* Transform — never below 0.95 */
--scale-press: 0.98;
--scale-hover-subtle: 1.02;
--scale-entrance: 0.96;
The values in globals.css are authoritative; keep this copy in sync when tokens change.
CSS utilities (same file)
| Utility | What it does | Touch-safe? | Pair with |
|---|---|---|---|
.press-feedback |
:active scale to var(--scale-press) |
Yes (:active fires on tap) |
Already on every <Button> |
.hover-lift |
:hover translateY(-2px) |
Yes (@media (hover: hover) and (pointer: fine)) |
Cards, tiles, list rows |
.hover-scale-subtle |
:hover scale(var(--scale-hover-subtle)) |
Yes (@media (hover: hover) and (pointer: fine)) |
Buttons, badges, marketing CTAs |
.spinner-essential |
infinite spin exempt from the reduced-motion kill (essential status feedback) | Yes | Loader2 loading indicators only |
The first three share one transition-property declaration, so they can be stacked on one element without overriding each other's transition list.
TS constants (@asym/lib/motion-presets)
EASE_OUT_SOFT, EASE_IN_SOFT, EASE_IN_OUT_SOFT, EASE_DRAWER, DURATION_PRESS, DURATION_MICRO, DURATION_STANDARD, DURATION_ROUTE, DURATION_SHARED, DURATION_DRAWER, DURATION_SLOW, STAGGER_TIGHT, STAGGER_MEDIUM, SCALE_HOVER_SUBTLE, SCALE_TAP_SUBTLE, SCALE_ENTRANCE. They match the CSS tokens in numeric intent, not always in name (DURATION_SLOW is a TS-only marketing/hero tier; SCALE_TAP_SUBTLE matches --scale-press).
Pre-built Transition objects: transitionStandard, transitionSlow, transitionExitQuick, springTap (gestures only).
Reduced-motion-aware helpers:
propsHeroEntrance(reduceMotion, delay?, y?)— fade + small rise.propsFadeRiseInView(reduceMotion, options?)— fade + rise on scroll-in.propsScaleFadeInView(reduceMotion, options?)— fade + scale fromSCALE_ENTRANCE.
@asym/lib/motion and @asym/lib/motion-provider
ESLint (tooling/eslint-config/restricted-imports.mjs) bans importing motion/react or framer-motion directly. Import from @asym/lib/motion, which exports motion (the lazy m component), AnimatePresence, LayoutGroup, LazyMotion, domAnimation, useInView, useReducedMotion, and the common types.
Because motion is the lazy m component, it needs the MotionProvider from @asym/lib/motion-provider above it (`LazyMotion features={
Установить anim в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл anim?
Core's motion contract: shared easing, duration, stagger, and scale tokens; press/hover utilities; motion/react import rules; route view transitions; tooltip timing; and the reduced-motion baseline. Use when adding or reviewing interface motion in Core — hover and press feedback, entrances and exits, modals, toasts, menus, loading and skeleton states, staggered reveals, page or view transitions. Load emil-design-engineering for animation craft and the motion skill for motion/react API specifics.
Как установить скилл anim?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл anim запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic