astro-animations
3
总安装量
3
周安装量
#61471
全站排名
安装命令
npx skills add https://github.com/soborbo/claudeskills --skill astro-animations
Agent 安装分布
opencode
3
gemini-cli
3
antigravity
3
github-copilot
3
codex
3
kimi-cli
3
Skill 文档
Astro Animations Skill
Purpose
Provides animation patterns that enhance UX without harming performance or accessibility. All animations must serve a functional purpose and respect user motion preferences.
Core Rules
- Purpose over polish â Every animation should serve UX
- Performance first â Use CSS, avoid JS where possible
- Respect preferences â Honor
prefers-reduced-motion - Subtle over flashy â Enhance, don’t distract
- Fast â Animations under 300ms for interactions
- No layout shift â Animations must not cause cumulative layout shift
- Progressive enhancement â UI must work without animations
- Intersection Observer â Use for scroll-based reveals
- View Transitions API â Leverage for page transitions in Astro
- Loading feedback â Always show loading states with skeletons or spinners
Animation Timing
| Type | Duration | Easing |
|---|---|---|
| Micro-interaction | 100-200ms | ease-out |
| Reveal/Fade | 200-400ms | ease-out |
| Slide | 300-500ms | ease-in-out |
| Page transition | 200-300ms | ease-out |
References
- CSS Utilities â Base animation classes and keyframes
- Scroll Animations â Intersection Observer-based reveals
- Micro-Interactions â Button hovers, form focus, success/error animations
- Loading States â Skeleton loaders and shimmer effects
- Page Transitions â View Transitions API implementation
- Stagger Animations â Sequential reveal patterns
- Reduced Motion â Accessibility best practices
Forbidden
- â Animations without
prefers-reduced-motionhandling - â Animations over 500ms for UI feedback
- â Animations that block interaction
- â Gratuitous/decorative-only animations
- â JS animations when CSS works
- â Animations that cause layout shift
- â Auto-playing animations without user control
- â Animations that flash more than 3 times per second
Definition of Done
- All animations respect reduced motion
- Interaction animations under 300ms
- Reveal animations under 500ms
- No layout shift from animations
- Loading states have skeleton/spinner
- Page transitions smooth
- Focus states animated
- All animations tested with
prefers-reduced-motion: reduce - Scroll animations use Intersection Observer
- No animation blocks user interaction