Skip to main content
skill CX Codex

accordions-dropdowns — Claude Code skill: what it does and install

Applies Disney animation principles to accordions, dropdowns, and collapsibles. Helps agents write CSS transitions that reveal content smoothly without layout jumps.

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

What accordions-dropdowns does

The skill equips coding agents with exact transition rules for expandable UI widgets. It establishes fixed timing windows: 250–350ms for container expansion or collapse, 200–250ms for chevron icon rotation, and 150–200ms for content opacity fade. Internal elements stagger by 30–50ms.

Instead of guessing height transitions, the instructions rely on CSS grid. The primary technique switches grid-template-rows from 0fr to 1fr with overflow: hidden. An alternative pattern handles max-height. Expansion uses ease-out, collapse uses ease-in, and cubic-bezier(0.4, 0, 0.2, 1) serves as the default curve.

Omitting overflow: hidden breaks the transition immediately because overflowing content leaks out during height recalculation. The skill separates interaction into four strict phases: collapsed, expanding, expanded, and collapsing. That structure keeps rapid clicks from breaking the animation.

What it helps with

  • animate dynamic height transitions using CSS grid-template-rows
  • sync chevron rotation with staggered content reveals
  • remove layout jitter during accordion expand and collapse states
  • apply Disney animation timing curves to dropdown menus

Example prompts for the agent

  • Animate this FAQ accordion using CSS grid transitions and a rotating chevron.
  • Add a collapsible dropdown with ease-out opening and ease-in closing transitions.
  • Create an accordion with staggered 30ms fade-ins for internal list items.

How to install accordions-dropdowns

1Skills CLI (Vercel)

npx skills add dylantarre/animation-principles --skill accordions-dropdowns -a claude-code

2Manually: put the files in place

~/.claude/skills/accordions-dropdowns/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/accordions-dropdowns/

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

Questions about accordions-dropdowns

How to install accordions-dropdowns in Claude Code?

Run npx skills add dylantarre/animation-principles --skill accordions-dropdowns -a claude-code. This places the configuration in ~/.claude/skills/accordions-dropdowns/SKILL.md.

What does accordions-dropdowns do?

It teaches coding models how to implement expandable UI elements using Disney's animation guidelines. The skill supplies transition timings, easing curves, and CSS snippets for accordions and menus.

Which CSS technique does the skill use for height animation?

It recommends transitioning grid-template-rows from 0fr to 1fr inside an overflow: hidden wrapper. It also includes an alternative implementation using max-height.

Source text

SKILL.md · MIT
---
name: accordions-dropdowns
description: Use when animating accordions, collapsibles, dropdowns, or expand/collapse elements for smooth reveal transitions
---

# Accordion & Dropdown Animation Principles

Apply Disney's 12 principles to expand/collapse elements for smooth, informative reveals.

## Principles Applied to Accordions

### 1. Squash & Stretch
Content can slightly compress as it collapses, stretch as it expands. Trigger header can squash on click feedback.

### 2. Anticipation
Before expanding, header briefly depresses. Chevron starts rotation before content reveals. Builds expectation.

### 3. Staging
Expanded section should be clearly visible. Consider dimming other accordion items. Active header stays highlighted.

### 4. Straight Ahead & Pose to Pose
Define clear states: collapsed, expanding, expanded, collapsing. Pose-to-pose for controlled, reversible animations.

### 5. Follow Through & Overlapping Action
Container expands first, content fades in 50-100ms later. Chevron rotation can overshoot and settle. Creates depth.

### 6. Ease In & Ease Out
Expand: `ease-out` (fast start, smooth finish). Collapse: `ease-in` (slow start, fast finish). `cubic-bezier(0.4, 0, 0.2, 1)` works well.

### 7. Arcs
Chevron rotation should ease through the arc. Content items can enter with slight arc paths rather than straight down.

### 8. Secondary Action
While content reveals (primary), chevron rotates (secondary), sibling accordions may collapse (tertiary).

### 9. Timing
- Expand/collapse: 250-350ms
- Chevron rotation: 200-250ms
- Content fade: 150-200ms
- Stagger internal items: 30-50ms
- Click feedback: 50ms

### 10. Exaggeration
Important reveals can use more dramatic timing. FAQ accordions can have snappier animations. Match content importance.

### 11. Solid Drawing
Maintain consistent header heights. Content should not jitter during height animation. Use proper height techniques.

### 12. Appeal
Smooth accordions feel polished. Janky height animations feel broken. Proper expand/collapse is worth the technical investment.

## CSS Implementation

```css
.accordion-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 300ms ease-out;
}

.accordion-content.open {
  grid-template-rows: 1fr;
}

.accordion-inner {
  overflow: hidden;
}

.accordion-chevron {
  transition: transform 250ms ease-out;
}

.accordion-header[aria-expanded="true"] .accordion-chevron {
  transform: rotate(180deg);
}

/* Alternative: animate max-height */
.dropdown-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease-out;
}

.dropdown-content.open {
  max-height: 500px; /* larger than content */
}
```

## Key Properties
- `grid-template-rows`: smooth height
- `max-height`: simpler but less precise
- `transform`: rotate chevrons
- `opacity`: content fade
- `overflow`: hidden during transition

© dylantarre · MIT · dylantarre/animation-principles

Similar skills

All skills for Frontend and UI →

From the same set142

Animation Principles - Universal Reference A reference guide covering Disney's 12 animation principles with beginner and advanced breakdowns. It helps the agent tailor motion concepts to any experience level. CX Codex +1 505installs exaggeration-mastery A skill that helps you decide how far to push motion past realism so key moments land on screen. CX Codex +1 505installs brand-strategist Turns the 12 animation principles into brand decisions: timing, easing, how much stretch fits your character. Useful when motion has to match the rest of the identity. CX Codex +1 505installs exit-animations A skill that tells the agent how to animate elements leaving the screen: closing modals, dismissing notifications, removing list items. CX Codex +1 502installs Animation Principles - Expert A skill for animators who already know the classic principles and want to break them deliberately: anti-squash, omitted anticipation, broken arcs. CX Codex +1 501installs Animation Principles - Quick Start A five-minute reference guide covering the 12 classic Disney animation principles. Useful when an agent needs a rapid refresher on motion and timing. CX Codex +1 502installs timing-calibration A skill that diagnoses animations that feel too fast, too slow or inconsistent, then hands back concrete durations and easing. CX Codex +1 499installs urgency-action Provides motion design guidelines for time-sensitive UI elements and calls to action. Helps animate timers and checkout buttons. CX Codex +1 499installs

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