Skip to main content
skill CX Codex

css-native · dylantarre — Claude Code skill: 12 animation principles in CSS

This skill gets your agent writing motion with plain CSS: @keyframes, transition, transform. Useful when interface animation should not pull in a JS library.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add dylantarre/animation-principles --skill css-native -a claude-code
Open on GitHub

What css-native does

The skill walks through all 12 Disney animation principles and shows how to express each one in CSS. Squash and stretch lives in scaleX and scaleY inside keyframes. Anticipation is a short wind-up before the jump. Staging separates hero from background with z-index, blur and opacity. Follow through and overlapping action come from staggering hair and cape animations with animation-delay.

Every principle ships with a snippet: @keyframes for arcs and bounces, cubic-bezier for slow in and slow out, offset-path for real curves, transform-style: preserve-3d plus perspective for depth. A timing table covers micro-interactions, button feedback, page transitions and complex scenes. The skill suggests starting around 100–200 ms for small reactions and keeping them under 300 ms.

It runs in Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode. Install is one command, and the skill file lands in that platform's directory. Copilot uses a different command through gh skill install. There is nothing to build and no dependency to add, because everything rests on CSS properties browsers already handle.

What it helps with

  • build a button bounce in pure CSS without JS
  • add a wind-up before a jump animation
  • separate hero from background by depth of field
  • pick a duration for a micro-interaction
  • move an element along an arc with offset-path

Example prompts for the agent

  • Animate a ball with squash and stretch in CSS, no JS
  • Add a wind-up before the character jumps using @keyframes
  • Pick durations for button feedback and a page transition

How to install css-native

1Skills CLI (Vercel)

npx skills add dylantarre/animation-principles --skill css-native -a claude-code

2Manually: put the files in place

~/.claude/skills/css-native/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/css-native/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about css-native

How do I install css-native in Claude?

Run npx skills add dylantarre/animation-principles --skill css-native -a claude-code. The file ends up at ~/.claude/skills/css-native/SKILL.md.

What does css-native do?

It maps the 12 Disney animation principles onto CSS keyframes, transitions and transforms. Your agent pulls ready snippets and timing values from it.

Does the skill need any libraries?

No. Every example uses animation, transition, transform and offset-path.

Source text

SKILL.md · MIT
---
name: css-native
description: Use when implementing Disney's 12 animation principles with pure CSS animations and transitions
---

# CSS Native Animation Principles

Implement all 12 Disney animation principles using CSS animations, transitions, and transforms.

## 1. Squash and Stretch

```css
@keyframes squash-stretch {
  0%, 100% { transform: scaleX(1) scaleY(1); }
  50% { transform: scaleX(1.2) scaleY(0.8); }
}
.ball { animation: squash-stretch 0.3s ease-in-out; }
```

## 2. Anticipation

```css
@keyframes anticipate-jump {
  0% { transform: translateY(0); }
  20% { transform: translateY(10px) scaleY(0.9); } /* wind up */
  100% { transform: translateY(-100px); }
}
```

## 3. Staging

```css
.hero { z-index: 10; filter: none; }
.background { z-index: 1; filter: blur(2px); opacity: 0.7; }
```

## 4. Straight Ahead / Pose to Pose

```css
/* Pose to pose - define keyframes explicitly */
@keyframes walk-cycle {
  0% { background-position: 0 0; }
  25% { background-position: -100px 0; }
  50% { background-position: -200px 0; }
  75% { background-position: -300px 0; }
  100% { background-position: -400px 0; }
}
```

## 5. Follow Through and Overlapping Action

```css
.character { animation: move 0.5s ease-out; }
.hair { animation: move 0.5s ease-out 0.05s; } /* slight delay */
.cape { animation: move 0.5s ease-out 0.1s; }
```

## 6. Slow In and Slow Out

```css
.element {
  transition: transform 0.4s cubic-bezier(0.42, 0, 0.58, 1);
}
/* Or use: ease-in-out, ease-in, ease-out */
```

## 7. Arc

```css
@keyframes arc-motion {
  0% { transform: translate(0, 0); }
  50% { transform: translate(100px, -80px); }
  100% { transform: translate(200px, 0); }
}
/* Use offset-path for true arcs */
.element { offset-path: path('M0,100 Q100,0 200,100'); }
```

## 8. Secondary Action

```css
.button:hover {
  transform: scale(1.05);
}
.button:hover .icon {
  animation: wiggle 0.3s ease-in-out;
}
```

## 9. Timing

```css
.fast { animation-duration: 0.15s; }
.normal { animation-duration: 0.3s; }
.slow { animation-duration: 0.6s; }
.dramatic { animation-duration: 1.2s; }
```

## 10. Exaggeration

```css
@keyframes exaggerated-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-150px) scale(0.8, 1.3); }
}
```

## 11. Solid Drawing

```css
.element {
  transform-style: preserve-3d;
  perspective: 1000px;
}
.face { transform: rotateY(20deg); }
```

## 12. Appeal

```css
.appealing {
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}
.appealing:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
```

## Timing Reference

| Action | Duration |
|--------|----------|
| Micro-interaction | 100-200ms |
| Button feedback | 150-300ms |
| Page transitions | 300-500ms |
| Complex animations | 500-1000ms |

## Key CSS Properties

- `animation` / `@keyframes`
- `transition`
- `transform`
- `offset-path` (motion paths)
- `animation-timing-function`
- `animation-delay`

© dylantarre · MIT · dylantarre/animation-principles

Similar skills

Everything for Frontend and UI →

css-native by other authors comes first.

From the same set86

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor