Skip to main content
skill CX Codex

carousels-sliders — Claude Code skill: what it does, how to install

Applies traditional animation principles to carousels, sliders, and image galleries to build fluid horizontal navigation.

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

What carousels-sliders does

This skill adapts Disney's animation principles for UI sliders, galleries, and horizontally scrolling views. It defines exact timing targets: 300–500ms for slide transitions, 150ms for pagination indicators, and 4000–6000ms for autoplay intervals. Swipe releases use ease-out momentum slowdowns, while button clicks follow cubic-bezier(0.25, 0.1, 0.25, 1).

It also details spatial behavior. Fast swipes compress slightly along the scroll axis, and upcoming slides anticipate navigation by shifting 5–10px. Non-active slides scale down to 0.9 with 0.6 opacity to emphasize the active view. Implementations rely on standard CSS rules like scroll-snap-type: x mandatory and transform.

Because the guidelines rely strictly on standard CSS transitions and snap points, they do not require extra animation runtimes or external dependencies.

What it helps with

  • define timing and easing curves for carousel navigation
  • configure CSS scroll snap for smooth horizontal alignment
  • apply squash and anticipation effects to touch swipes
  • style inactive and active slide states with scale and opacity

Example prompts for the agent

  • Apply carousels-sliders principles to animate this product gallery.
  • Set up CSS transitions and easing for our hero carousel slides.
  • Configure scroll snap and slide scaling for a touch-friendly carousel.

How to install carousels-sliders

1Skills CLI (Vercel)

npx skills add dylantarre/animation-principles --skill carousels-sliders -a claude-code

2Manually: put the files in place

~/.claude/skills/carousels-sliders/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/carousels-sliders/

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

Questions about carousels-sliders

How to install carousels-sliders in Claude Code?

Run npx skills add dylantarre/animation-principles --skill carousels-sliders -a claude-code. The skill file will be created at ~/.claude/skills/carousels-sliders/SKILL.md.

What does the carousels-sliders skill do?

It provides animation guidelines, timing presets, and CSS patterns for sliders, carousels, and image galleries.

What animation timing does this skill specify?

It specifies 300–500ms for slide transitions, 200–400ms for swipe momentum, 150ms for pagination dots, and 4000–6000ms for autoplay intervals.

Source text

SKILL.md · MIT
---
name: carousels-sliders
description: Use when animating carousels, sliders, image galleries, or horizontally scrolling content for smooth navigation
---

# Carousel & Slider Animation Principles

Apply Disney's 12 principles to carousels and sliders for smooth, intuitive navigation.

## Principles Applied to Carousels

### 1. Squash & Stretch
Slides can slightly compress in scroll direction during fast swipes. Expands perception of speed and momentum.

### 2. Anticipation
Before slide change, current slide can shift 5-10px in direction of navigation. Button can depress before triggering.

### 3. Staging
Current/active slide should be prominently displayed: larger, centered, more opaque. Adjacent slides can be dimmed or scaled down.

### 4. Straight Ahead & Pose to Pose
Use pose-to-pose: define exact positions for each slide. Snap points should be clear and predictable.

### 5. Follow Through & Overlapping Action
After snap, slide can overshoot slightly and settle back. Content within slide (text, buttons) lags behind container movement.

### 6. Ease In & Ease Out
Swipe release: `ease-out` (momentum slowdown). Button navigation: `ease-in-out`. `cubic-bezier(0.25, 0.1, 0.25, 1)` for smooth slides.

### 7. Arcs
3D carousels should rotate slides along curved paths. Coverflow effects follow arc naturally. Even flat carousels can have subtle Y movement.

### 8. Secondary Action
While slide moves (primary), pagination updates (secondary), adjacent slides scale/fade (tertiary), progress bar moves (quaternary).

### 9. Timing
- Slide transition: 300-500ms
- Swipe momentum: 200-400ms
- Pagination dot: 150ms
- Autoplay interval: 4000-6000ms
- Pause on hover: immediate
- Adjacent slide scale: 250ms

### 10. Exaggeration
Hero carousels can use more dramatic transitions. Product carousels should be smoother, less distracting. Scale to context.

### 11. Solid Drawing
Maintain consistent slide dimensions. Gaps should stay uniform. Aspect ratios must be preserved during any transforms.

### 12. Appeal
Smooth carousels feel premium. Janky sliders feel cheap. Touch response should feel native. Investment here pays dividends.

## CSS Implementation

```css
.carousel-track {
  display: flex;
  transition: transform 400ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

.carousel-slide {
  flex-shrink: 0;
  transition: transform 300ms ease-out,
              opacity 300ms ease-out;
}

.carousel-slide:not(.active) {
  transform: scale(0.9);
  opacity: 0.6;
}

.pagination-dot {
  transition: transform 150ms ease-out,
              background-color 150ms ease-out;
}

.pagination-dot.active {
  transform: scale(1.3);
}

/* CSS scroll snap */
.carousel-container {
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

.carousel-slide {
  scroll-snap-align: center;
}
```

## Key Properties
- `transform`: translateX, scale
- `opacity`: inactive slides
- `scroll-snap-type`: native snapping
- `scroll-behavior`: smooth scrolling
- `transition`: slide movements

© dylantarre · MIT · dylantarre/animation-principles

Similar skills

Everything 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