/animation-performance-retro
Optimize 8-bit animations for smooth performance. Apply when creating animated pixel art, game UI effects, or any retro-styled animations.
$ npx -y skills add theorcdev/8bitcn-ui --skill animation-performance-retro --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/animation-performance-retro
Context preview
The summary Claude sees to decide when to auto-load this skill.
Optimize 8-bit animations for smooth performance. Apply when creating animated pixel art, game UI effects, or any retro-styled animations.
SKILL.md
animation-performance-retro.SKILL.mdname: animation-performance-retro
description: Optimize 8-bit animations for smooth performance. Apply when creating animated pixel art, game UI effects, or any retro-styled animations.
Animation Performance for Retro UI
Optimize animations for smooth pixel art rendering and game-like interfaces.
Hardware Acceleration
Use CSS transforms for GPU-accelerated animations:
<div className="transition-transform hover:scale-110" />
<div className="translate-x-0 translate-y-0" />
**Avoid animating:**
- `width`, `height` (triggers layout)
- `margin`, `padding` (triggers layout)
- `top`, `left` (triggers layout)
**Prefer animating:**
- `transform` (GPU accelerated)
- `opacity` (GPU accelerated)
- `filter` (GPU accelerated)
Pixelated Animations
Wrap animated SVGs in divs for hardware acceleration:
function PixelSpinner() {
return (
<div className="animate-spin">
<svg viewBox="0 0 16 16">
<rect x="2" y="2" width="4" height="4" fill="currentColor" />
</svg>
</div>
);
}Loading States
Use pulse animations for retro loading indicators:
function RetroSkeleton() {
return (
<div className="relative animate-pulse">
<div className="h-20 bg-muted" />
</div>
);
}Custom Retro Animations
Define pixel-art-specific animations:
<div
className="retro animate-[blink_0.5s_step-end_infinite]"
style={{
textShadow: "1px 1px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff"
}}
>
LEVEL UP!
</div>
<style>{`
@keyframes blink {
0%, 100% { opacity: 1; }
50% { opacity: 0; }
}
`}</style>Conditional Animation States
Apply animations based on game state:
<div
className={cn(
"transition-all duration-300",
health <= 25 && "animate-pulse bg-red-500/20",
isLevelUp && "animate-bounce"
)}
/>Radix UI Animations
Use Radix state-based animations for overlays:
<DialogContent
className={cn(
"data-[state=open]:animate-in data-[state=closed]:animate-out",
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"
)}
/>
<AccordionContent
className={cn(
"overflow-hidden data-[state=closed]:animate-accordion-up",
"data-[state=open]:animate-accordion-down"
)}
/>Key Principles
1. **Wrap SVGs** - Always wrap in div for hardware acceleration 2. **Use transforms** - Prefer `transform` over `top`/`left` 3. **Step animations** - Use `step-end` for pixel-art feel 4. **Conditional classes** - Apply animations based on game state 5. **Custom keyframes** - Define retro-specific animations 6. **Text shadows** - White shadow for legibility on colored backgrounds
Performance Checklist
- [ ] Animated elements wrapped in divs
- [ ] No layout-triggering properties animated
- [ ] Loading states use `animate-pulse`
- [ ] Conditional animations properly gated
- [ ] Custom animations use step timing functions
Reference Components
- `components/ui/8bit/spinner.tsx` - Animated spinner
- `components/ui/8bit/xp-bar.tsx` - Custom blink animation
- `components/ui/8bit/skeleton.tsx` - Loading skeleton
- `components/ui/8bit/accordion.tsx` - Radix state animations
Read more
name: animation-performance-retro description: Optimize 8-bit animations for smooth performance. Apply when creating animated pixel art, game UI effects, or any retro-styled animations.
Animation Performance for Retro UI
Optimize animations for smooth pixel art rendering and game-like interfaces.
Hardware Acceleration
Use CSS transforms for GPU-accelerated animations:
<div className="transition-transform hover:scale-110" /> <div className="translate-x-0 translate-y-0" />
**Avoid animating:**
- `width`, `height` (triggers layout)
- `margin`, `padding` (triggers layout)
- `top`, `left` (triggers layout)
**Prefer animating:**
- `transform` (GPU accelerated)
- `opacity` (GPU accelerated)
- `filter` (GPU accelerated)
Pixelated Animations
Wrap animated SVGs in divs for hardware acceleration:
function PixelSpinner() {
return (
<div className="animate-spin">
<svg viewBox="0 0 16 16">
<rect x="2" y="2" width="4" height="4" fill="currentColor" />
</svg>
</div>
);
}Loading States
Use pulse animations for retro loading indicators:
function RetroSkeleton() {
return (
<div className="relative animate-pulse">
<div className="h-20 bg-muted" />
</div>
);
}Custom Retro Animations
Define pixel-art-specific animations:
<div
className="retro animate-[blink_0.5s_step-end_infinite]"
style={{
textShadow: "1px 1px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff"
}}
>
LEVEL UP!
</div>
<style>{`
@keyframes blink {
0%, 100% { opacity: 1; }
50% { opacity: 0; }
}
`}</style>Conditional Animation States
Apply animations based on game state:
<div
className={cn(
"transition-all duration-300",
health <= 25 && "animate-pulse bg-red-500/20",
isLevelUp && "animate-bounce"
)}
/>Radix UI Animations
Use Radix state-based animations for overlays:
<DialogContent
className={cn(
"data-[state=open]:animate-in data-[state=closed]:animate-out",
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"
)}
/>
<AccordionContent
className={cn(
"overflow-hidden data-[state=closed]:animate-accordion-up",
"data-[state=open]:animate-accordion-down"
)}
/>Key Principles
1. **Wrap SVGs** - Always wrap in div for hardware acceleration 2. **Use transforms** - Prefer `transform` over `top`/`left` 3. **Step animations** - Use `step-end` for pixel-art feel 4. **Conditional classes** - Apply animations based on game state 5. **Custom keyframes** - Define retro-specific animations 6. **Text shadows** - White shadow for legibility on colored backgrounds
Performance Checklist
- [ ] Animated elements wrapped in divs
- [ ] No layout-triggering properties animated
- [ ] Loading states use `animate-pulse`
- [ ] Conditional animations properly gated
- [ ] Custom animations use step timing functions
Reference Components
- `components/ui/8bit/spinner.tsx` - Animated spinner
- `components/ui/8bit/xp-bar.tsx` - Custom blink animation
- `components/ui/8bit/skeleton.tsx` - Loading skeleton
- `components/ui/8bit/accordion.tsx` - Radix state animations
Accessible retro components that you can copy and paste into your apps.Free. Open Source. Built on shadcn/ui. Documentation · Components · Blocks · Themes · Discord
Repo: theorcdev/8bitcn-ui
Other skills on 8bitcn-ui.
- /8-bit-pixel-art-patterns
Create pixelated borders, shadows, and effects for 8-bit retro components. Apply when building 8-bit styled UI components that need authentic pixel art aesthetics.
Open skill - /8bit-docs-patterns
Create documentation with gaming-specific examples, retro styling, and 8-bit terminology. Apply when documenting gaming blocks, RPG components, or retro-styled UI elements.
Open skill - /bundle-barrel-imports
Import directly from source files instead of barrel files. Apply when using libraries like lucide-react, @mui/material, or @radix-ui/react-* to reduce bundle size and improve dev boot time.
Open skill - /bundle-dynamic-imports
Use next/dynamic for lazy-loading heavy components. Apply when importing large components like editors, charts, or rich text editors that aren't needed on initial render.
Open skill - /component-wrapper-architecture
Best practices for wrapping shadcn/ui components. Apply when creating 8-bit styled variants of existing shadcn/ui components.
Open skill - /fumadocs-component-docs
Create component documentation with installation, usage examples, and preview sections. Apply when documenting 8-bit components with proper structure and examples.
Open skill

