cards-containers — скилл для Claude Code: суть и установка
Набор правил анимации карточек, плиток и контейнеров по 12 принципам Диснея. Помогает настроить физику перетаскивания, подъём при наведении и раскрытие списков.
npx skills add dylantarre/animation-principles --skill cards-containers -a claude-codeЧто делает cards-containers
Скилл задаёт агенту правила движения элементов интерфейса: карточек, всплывающих панелей и тайлов. В основу легли классические принципы анимации. Например, для перетаскивания карточки задаётся сжатие не более 2–3%, а перед полным раскрытием добавляется фаза ожидания со сжатием до 0.98 на 50 мс.
Внутри описаны точные тайминги и кривые Безье. Подъём карточки при наведении занимает 200–250 мс с функцией ease-out, а для плавного движения рекомендован cubic-bezier(0.25, 0.1, 0.25, 1). Текст и иконки внутри контейнера отстают от каркаса на 20–40 мс. Без плавной функции перехода линейные анимации сразу ломают ощущение глубины.
Для стилизации скилл задействует свойства transform, box-shadow, z-index, filter и opacity. При смене порядка карточек на экране траектория должна идти по дуге, а не по прямой линии.
Какие задачи решает
- рассчитать тайминги и задержки для анимации карточек
- настроить эффект подъёма карточки при наведении через transform и box-shadow
- сделать плавное раскрытие карточки в подробный вид с фазой подготовки
- добавить эффект отставания внутреннего контента от контейнера
Примеры запросов агенту
- Сделай CSS-анимацию наведения для карточки товара с лёгким подъёмом и тенью
- Настрой плавное раскрытие плитки в модальное окно с подготовкой движения
- Добавь отставание текста и картинки внутри карточки при её перемещении
Как установить cards-containers
1Через Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill cards-containers -a claude-code2Вручную: положить файлы
~/.claude/skills/cards-containers/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/cards-containers/
1Через Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill cards-containers -a codex2Вручную: положить файлы
.agents/skills/cards-containers/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill cards-containers -a cursor2Вручную: положить файлы
.cursor/skills/cards-containers/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install dylantarre/animation-principles cards-containers2Вручную: положить файлы
.github/skills/cards-containers/SKILL.md1Через Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill cards-containers -a gemini-cli2Командой платформы
gemini skills install https://github.com/dylantarre/animation-principles --path skills/07-by-ui-element/cards-containersВручную: положить файлы
.devin/skills/cards-containers/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add dylantarre/animation-principles --skill cards-containers -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о cards-containers
Как установить cards-containers в Claude Code?
Выполните команду npx skills add dylantarre/animation-principles --skill cards-containers -a claude-code. Файл сохранится по пути ~/.claude/skills/cards-containers/SKILL.md.
Что делает скилл cards-containers?
Он передаёт ИИ-ассистенту инструкции по анимированию контейнеров и карточек на базе принципов анимации Диснея, включая тайминги, смещения и физику теней.
Какие тайминги рекомендуются для карточек?
Для наведения используется 200–250 мс, для выбора элемента — 150 мс, для раскрытия карточки — 300–400 мс, а для смены порядка — 250–350 мс.
Исходный текст
SKILL.md · MIT
---
name: cards-containers
description: Use when animating cards, panels, tiles, or container elements to create depth and interactivity
---
# Card & Container Animation Principles
Apply Disney's 12 principles to cards and containers for engaging, dimensional interfaces.
## Principles Applied to Cards
### 1. Squash & Stretch
Cards can subtly compress on drag-start and stretch when released. Keep it minimal: 2-3% scale change maximum.
### 2. Anticipation
Before expanding a card to detail view, briefly scale down (0.98) for 50ms, then expand. Prepares user for the transformation.
### 3. Staging
The card being interacted with should lift above others via `z-index` and shadow. Dim or blur background cards to focus attention.
### 4. Straight Ahead & Pose to Pose
Define clear states: resting, hovered, selected, expanded. Pose-to-pose transitions between these defined keyframes.
### 5. Follow Through & Overlapping Action
Card content (text, images, icons) should lag slightly behind card movement. Stagger by 20-40ms for natural feel.
### 6. Ease In & Ease Out
Card lifts use `ease-out`, card settles use `ease-in-out`. Never linear. `cubic-bezier(0.25, 0.1, 0.25, 1)` for smooth lifts.
### 7. Arcs
When cards reorder (drag-and-drop), they should follow curved paths, not straight lines. Add slight rotation during movement.
### 8. Secondary Action
While card lifts (primary), shadow expands and blurs (secondary). Image inside can subtle zoom. Border can glow.
### 9. Timing
- Hover lift: 200-250ms
- Selection: 150ms
- Expand to detail: 300-400ms
- Reorder/shuffle: 250-350ms
- Stagger between cards: 50-75ms
### 10. Exaggeration
Hover shadows can extend 2-3x normal depth. Selected cards can lift 8-12px. Keep proportional to card size.
### 11. Solid Drawing
Maintain consistent border-radius ratios when scaling. Shadows should always come from same light source. Preserve aspect ratios.
### 12. Appeal
Rounded corners feel approachable, subtle shadows add premium feel. Smooth transitions build trust. Cards should feel like physical objects.
## CSS Implementation
```css
.card {
transition: transform 250ms ease-out,
box-shadow 250ms ease-out;
}
.card:hover {
transform: translateY(-8px) scale(1.02);
box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}
.card-content {
transition: transform 280ms ease-out; /* slight lag */
}
```
## Key Properties
- `transform`: translateY, scale, rotate
- `box-shadow`: depth and lift
- `z-index`: layering
- `filter`: blur for background
- `opacity`: focus states
© dylantarre · MIT · dylantarre/animation-principles