buttons-ctas — скилл для Claude Code: анимация кнопок и CTA
Скилл для ИИ-кодинга, который подсказывает агенту, как анимировать кнопки и CTA: состояния, тайминги, CSS-переходы.
npx skills add dylantarre/animation-principles --skill buttons-ctas -a claude-codeЧто делает buttons-ctas
Скилл раскладывает анимацию кнопок по двенадцати принципам Disney и превращает их в конкретные CSS-правила. Нажатие — transform: scale(0.95) на :active и возврат к scale(1) при отпускании. Ховер — лёгкий подъём через translateY(-2px), чтобы клик ощущался заранее. Внутри есть готовый блок CSS для .btn, .btn:hover и .btn:active с переходами по transform, box-shadow и background-color.
Тайминги заданы числами: ховер 150–200ms, нажатие 50–100ms, кольцо фокуса 150ms, переход в состояние загрузки 200–300ms. Линейную кривую скилл запрещает: на вход в ховер советует ease-out, на выход — ease-in, а как рабочую кривую называет cubic-bezier(0.4, 0, 0.2, 1). Для состояний кнопки предлагает pose-to-pose: отдельные ключевые кадры для default, hover, active и disabled.
Ограничение простое: это текстовый скилл с принципами и примерами CSS, а не библиотека компонентов. Он ничего не устанавливает в ваш проект и не подключает зависимости. Если у вас уже есть дизайн-система со своими токенами переходов, числа из скилла придётся согласовывать с ней, иначе кнопки начнут жить по двум разным таймингам. Ставится одной командой через npx skills.
Скилл лежит в репозитории dylantarre/animation-principles под лицензией MIT и работает в Claude, Codex, Cursor, GitHub Copilot, Gemini CLI и OpenCode.
Какие задачи решает
- сделать нажатие кнопки тактильно ощутимым
- подобрать тайминги для ховера и press без линейной кривой
- развести визуально primary и secondary CTA
- добавить ripple или поворот иконки как вторичное действие
- собрать состояния default, hover, active и disabled в единую систему
Примеры запросов агенту
- добавь анимацию нажатия для кнопки оформления заказа
- сделай ховер для primary CTA заметнее, чем у secondary
- перепиши переходы кнопки на ease-out и cubic-bezier(0.4, 0, 0.2, 1)
Как установить buttons-ctas
1Через Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill buttons-ctas -a claude-code2Вручную: положить файлы
~/.claude/skills/buttons-ctas/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/buttons-ctas/
1Через Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill buttons-ctas -a codex2Вручную: положить файлы
.agents/skills/buttons-ctas/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill buttons-ctas -a cursor2Вручную: положить файлы
.cursor/skills/buttons-ctas/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install dylantarre/animation-principles buttons-ctas2Вручную: положить файлы
.github/skills/buttons-ctas/SKILL.md1Через Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill buttons-ctas -a gemini-cli2Командой платформы
gemini skills install https://github.com/dylantarre/animation-principles --path skills/07-by-ui-element/buttons-ctasВручную: положить файлы
.devin/skills/buttons-ctas/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill buttons-ctas -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о buttons-ctas
Как установить buttons-ctas в Claude?
Выполните npx skills add dylantarre/animation-principles --skill buttons-ctas -a claude-code. Скилл окажется в ~/.claude/skills/buttons-ctas/SKILL.md.
Что делает buttons-ctas?
Даёт агенту принципы анимации кнопок и CTA: масштаб на нажатии, подъём на ховере, тайминги состояний и готовый CSS для переходов.
Это библиотека компонентов?
Нет. Это текстовый скилл с принципами и примерами CSS, он не добавляет зависимости в проект.
Исходный текст
SKILL.md · MIT
---
name: buttons-ctas
description: Use when animating buttons, CTAs, or clickable action elements to create satisfying, responsive interactions
---
# Button & CTA Animation Principles
Apply Disney's 12 principles to create buttons that feel alive and responsive.
## Principles Applied to Buttons
### 1. Squash & Stretch
Scale buttons slightly on press: `transform: scale(0.95)` on `:active`, return to `scale(1)` on release. Creates tactile feedback.
### 2. Anticipation
Subtle hover lift before click: `transform: translateY(-2px)` prepares users for the action.
### 3. Staging
Primary CTAs should be visually prominent. Use size, color contrast, and whitespace. Animate primary buttons more boldly than secondary.
### 4. Straight Ahead & Pose to Pose
Use pose-to-pose for button states: define clear keyframes for default, hover, active, and disabled states.
### 5. Follow Through & Overlapping Action
After click, let shadows or glows settle slightly after the button returns. Icon inside can lag 20-50ms behind button movement.
### 6. Ease In & Ease Out
Never use linear timing. Use `ease-out` for hover-in (fast start), `ease-in` for hover-out (gentle exit). `cubic-bezier(0.4, 0, 0.2, 1)` works well.
### 7. Arcs
Floating action buttons should move in arcs when repositioning. Use `transform` with easing rather than straight-line movement.
### 8. Secondary Action
Ripple effects, icon rotations, or shadow changes accompany the primary scale/color change. Don't let secondary actions overpower.
### 9. Timing
- Hover: 150-200ms
- Active/press: 50-100ms (snappy)
- Focus ring: 150ms
- Loading state transition: 200-300ms
### 10. Exaggeration
Success buttons can briefly scale to 1.05 before settling. Error states can include subtle shake (3-5px, 2-3 cycles).
### 11. Solid Drawing
Maintain consistent border-radius and proportions across states. Shadows should respect light source direction throughout.
### 12. Appeal
Round corners feel friendly, sharp corners feel professional. Match button personality to brand. Satisfying click feedback increases conversions.
## CSS Implementation
```css
.btn {
transition: transform 150ms ease-out,
box-shadow 150ms ease-out,
background-color 150ms ease-out;
}
.btn:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.btn:active {
transform: scale(0.97) translateY(0);
transition-duration: 50ms;
}
```
## Key Properties
- `transform`: scale, translate
- `box-shadow`: depth changes
- `background-color`: state indication
- `opacity`: disabled states
- `filter`: brightness on hover
© dylantarre · MIT · dylantarre/animation-principles