Skip to main content
skill CX Codex

universal-elements — Claude Code skill: what it does, how to install

Applies 12 classic animation principles to any interface component. It provides timing scales, custom cubic-bezier curves, and interaction guidelines.

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

What universal-elements does

This skill translates Disney's 12 animation principles into clear interface patterns. It establishes rules for press states, element entrances, and transitions between screens. Squash and stretch effects stay constrained between 2% and 5% to prevent distortion. Critical actions prepare the user with a 50-100ms anticipation movement before expanding.

Motion scales by component size. Micro-interactions run between 50ms and 200ms, while full-page transitions take up to 800ms. Nested child layers stagger behind parents by 20-50ms. In professional user interfaces, visual exaggeration stays strictly below 10%. Robotic straight-line paths are avoided.

The setup defines core CSS custom properties for timing and easing curves. Linear transitions are forbidden for interface elements, replaced by easing curves such as cubic-bezier(0.4, 0, 0.2, 1). Hardware-accelerated properties like transform, opacity, and box-shadow handle all state shifts without breaking layout consistency.

What it helps with

  • Define proper transition durations across button, modal, and page scales
  • Replace linear transitions with cubic-bezier easing curves
  • Add secondary feedback animations to shadows and icons
  • Stagger nested interface elements with timed offsets

Example prompts for the agent

  • Apply universal-elements timing and easing curves to our dropdown menu transition
  • Configure hover and press states for this button using the 2-5% squash rule
  • Stagger the entrance of list items using universal-elements duration guidelines

How to install universal-elements

1Skills CLI (Vercel)

npx skills add dylantarre/animation-principles --skill universal-elements -a claude-code

2Manually: put the files in place

~/.claude/skills/universal-elements/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/universal-elements/

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

Questions about universal-elements

How do I install universal-elements in Claude Code?

Run npx skills add dylantarre/animation-principles --skill universal-elements -a claude-code in your terminal. This creates the skill file at ~/.claude/skills/universal-elements/SKILL.md.

What does the universal-elements skill do?

It guides coding agents on applying classic motion principles to UI components. The skill defines strict timing brackets, cubic-bezier transition curves, and CSS custom properties for interface states.

Why does the skill prohibit linear transitions?

Linear motion feels rigid and robotic in web interfaces. The skill enforces ease-out for entrances, ease-in for exits, and curves like cubic-bezier(0.4, 0, 0.2, 1) for general state changes.

Source text

SKILL.md · MIT
---
name: universal-elements
description: Use when animating any UI element not covered by specific skills, or when applying general animation principles across multiple element types
---

# Universal Element Animation Principles

Apply Disney's 12 principles to any UI element for consistent, professional motion design.

## Universal Application of Principles

### 1. Squash & Stretch
Any element that responds to interaction can squash (compress on impact/press) and stretch (extend on release). Keep it subtle: 2-5% maximum for UI.

### 2. Anticipation
Before any significant action, a brief preparatory motion signals what's coming. Scale down before scale up, pull back before push forward. 50-100ms duration.

### 3. Staging
Direct attention to the most important element. Use contrast in motion, size, color, z-index, and blur to create clear visual hierarchy.

### 4. Straight Ahead & Pose to Pose
Pose-to-pose for most UI: define start and end states clearly. Straight-ahead for organic, flowing animations like particles or organic shapes.

### 5. Follow Through & Overlapping Action
Nothing stops all at once. Child elements lag behind parents. Shadows settle after objects. Stagger related elements 20-50ms apart.

### 6. Ease In & Ease Out
The golden rule: never use `linear` for UI motion. Enter with `ease-out`, exit with `ease-in`, transition with `ease-in-out`.

### 7. Arcs
Natural motion follows curved paths. Add subtle vertical movement to horizontal transitions. Rotate while translating. Avoid robotic straight lines.

### 8. Secondary Action
Every primary action deserves supporting animation. Shadow changes, color shifts, icon rotations, glow effects reinforce without competing.

### 9. Timing
| Element Type | Fast | Normal | Slow |
|--------------|------|--------|------|
| Micro (icons, buttons) | 50-100ms | 100-200ms | 200-300ms |
| Small (cards, inputs) | 150-200ms | 200-300ms | 300-400ms |
| Medium (modals, menus) | 200-250ms | 250-350ms | 350-500ms |
| Large (pages, overlays) | 300-400ms | 400-600ms | 600-800ms |

### 10. Exaggeration
Match animation intensity to context. Celebratory moments allow 20-30% exaggeration. Professional contexts keep it under 10%. Error states can be more dramatic.

### 11. Solid Drawing
Maintain visual consistency: border-radius ratios, shadow directions, spacing rhythms, typography scale. Nothing should distort or break during animation.

### 12. Appeal
The goal is delight without distraction. Smooth animations build trust. Snappy feedback feels responsive. The best animation is felt, not noticed.

## CSS Foundation

```css
/* Universal transition base */
* {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Standard durations as custom properties */
:root {
  --duration-fast: 100ms;
  --duration-normal: 200ms;
  --duration-slow: 350ms;
  --ease-out: cubic-bezier(0.0, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* Apply to any interactive element */
.interactive {
  transition: transform var(--duration-normal) var(--ease-standard),
              opacity var(--duration-normal) var(--ease-standard),
              box-shadow var(--duration-normal) var(--ease-standard);
}
```

## Key Properties (Any Element)
- `transform`: universal positioning and scaling
- `opacity`: visibility transitions
- `transition`: state changes
- `animation`: complex sequences
- `box-shadow`: depth and emphasis

© dylantarre · MIT · dylantarre/animation-principles

Similar skills

All skills for Frontend and UI →

From the same set142

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