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.
npx skills add dylantarre/animation-principles --skill accordions-dropdowns -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/accordions-dropdowns/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/accordions-dropdowns/
1Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill accordions-dropdowns -a codex2Manually: put the files in place
.agents/skills/accordions-dropdowns/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill accordions-dropdowns -a cursor2Manually: put the files in place
.cursor/skills/accordions-dropdowns/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dylantarre/animation-principles accordions-dropdowns2Manually: put the files in place
.github/skills/accordions-dropdowns/SKILL.md1Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill accordions-dropdowns -a gemini-cli2Platform CLI
gemini skills install https://github.com/dylantarre/animation-principles --path skills/07-by-ui-element/accordions-dropdownsManually: put the files in place
.devin/skills/accordions-dropdowns/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill accordions-dropdowns -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 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