buttons-ctas — Claude Code skill: button and CTA animation
A skill that tells your coding agent how to animate buttons and CTAs: states, timings, CSS transitions.
npx skills add dylantarre/animation-principles --skill buttons-ctas -a claude-codeWhat buttons-ctas does
The skill maps Disney's twelve animation principles onto buttons and turns them into CSS you can paste. Press feedback is transform: scale(0.95) on :active, back to scale(1) on release. Hover gets a small lift with translateY(-2px) so the click feels prepared. A ready .btn block covers transitions on transform, box-shadow and background-color.
Timings are concrete: hover 150–200ms, press 50–100ms, focus ring 150ms, loading transition 200–300ms. Linear timing is ruled out. Hover-in should use ease-out, hover-out ease-in, and cubic-bezier(0.4, 0, 0.2, 1) is named as a good curve. Button states follow pose-to-pose: separate keyframes for default, hover, active and disabled.
One thing to know before installing: this is a text skill with principles and CSS examples, not a component library. It adds nothing to your project and pulls in no dependencies. If your design system already defines transition tokens, expect to reconcile the numbers here with yours, otherwise buttons end up running on two different timing scales. Install is one command through npx skills.
The skill lives in dylantarre/animation-principles under MIT and targets Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode.
What it helps with
- make a button press feel tactile
- pick hover and press timings without linear easing
- separate primary and secondary CTAs visually
- add a ripple or icon rotation as a secondary action
- unify default, hover, active and disabled states
Example prompts for the agent
- add press animation to the checkout button
- make the primary CTA hover stronger than the secondary one
- rewrite the button transitions with ease-out and cubic-bezier(0.4, 0, 0.2, 1)
How to install buttons-ctas
1Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill buttons-ctas -a claude-code2Manually: put the files in place
~/.claude/skills/buttons-ctas/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/buttons-ctas/
1Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill buttons-ctas -a codex2Manually: put the files in place
.agents/skills/buttons-ctas/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill buttons-ctas -a cursor2Manually: put the files in place
.cursor/skills/buttons-ctas/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dylantarre/animation-principles buttons-ctas2Manually: put the files in place
.github/skills/buttons-ctas/SKILL.md1Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill buttons-ctas -a gemini-cli2Platform CLI
gemini skills install https://github.com/dylantarre/animation-principles --path skills/07-by-ui-element/buttons-ctasManually: put the files in place
.devin/skills/buttons-ctas/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill buttons-ctas -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about buttons-ctas
How do I install buttons-ctas in Claude?
Run npx skills add dylantarre/animation-principles --skill buttons-ctas -a claude-code. The skill lands in ~/.claude/skills/buttons-ctas/SKILL.md.
What does buttons-ctas do?
It gives the agent animation principles for buttons and CTAs: press scaling, hover lift, state timings and ready CSS transitions.
Is it a component library?
No. It is a text skill with principles and CSS examples, and it adds no dependencies to your project.
Source text
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