Installation guide
This guide covers everything you need to install and run Animation Playground locally, including detailed information about dependencies and deployment options.Prerequisites
Node.js version
Animation Playground requires Node.js 20 or later. Check your current version:Package manager
You can use any of these package managers:- npm - Comes bundled with Node.js
- yarn - Install with
npm install -g yarn - pnpm - Install with
npm install -g pnpm - bun - Download from bun.sh
Git
Git is required to clone the repository:Installation steps
Install dependencies
Choose your preferred package manager:This installs all required dependencies listed in
package.json.Dependencies explained
Animation Playground uses a carefully selected set of dependencies to demonstrate different animation techniques:Core framework
- Next.js 15.2.2 - React framework with App Router, server components, and optimized builds
- React 19 - Latest React with improved performance and concurrent features
Animation libraries
- Declarative animation API for React
- Built-in gesture support (drag, tap, hover)
- AnimatePresence for exit animations
- Reorder components for drag-to-reorder lists
- Used in: Timeline Editor, sortable lists, gesture demos
- Professional-grade JavaScript animation library
- High-performance timeline-based animations
- Advanced easing and control
- Used in: JavaScript animations tab
- Physics-based animations with spring dynamics
- Natural, realistic motion
- Interpolation and configuration options
- Used in: React animations tab, library comparison
- Simple component lifecycle animations
- CSS transition/animation integration
- Used in: Basic enter/exit animations
UI components
- Radix UI - Accessible, unstyled UI components
- Used for: Tab navigation, checkboxes in demos
Code highlighting
- Prism React Renderer - Syntax highlighting for code examples
- Displays generated CSS, JavaScript, and React code snippets
Styling
- Tailwind CSS 4 - Utility-first CSS framework
- Used throughout the application for responsive design
TypeScript
- Full TypeScript support for type safety and better DX
- Type definitions for all React and third-party libraries
Development server
Available scripts
Animation Playground includes these npm scripts:| Script | Command | Description |
|---|---|---|
dev | next dev | Starts development server on http://localhost:3000 |
build | next build | Creates optimized production build |
start | next start | Runs production server (requires build first) |
lint | next lint | Runs ESLint to check code quality |
Development features
The development server includes:- Hot Module Replacement (HMR) - See changes instantly without full page reload
- Fast Refresh - Preserves component state during edits
- TypeScript compilation - Real-time type checking
- Error overlay - Detailed error messages in the browser
Custom port
To run on a different port:Building for production
Create production build
Generate an optimized build:This creates a
.next folder with:- Minified JavaScript bundles
- Optimized CSS
- Pre-rendered static pages
- Server-side code
Test production build locally
Deployment options
Deploy to Vercel (recommended)
Vercel is the recommended platform for deploying Next.js applications:Connect to Vercel
- Visit vercel.com/new
- Import your GitHub repository
- Vercel auto-detects Next.js settings
- Click “Deploy”
Other deployment platforms
Animation Playground can be deployed to any platform that supports Next.js:Netlify
Netlify
- Install Netlify CLI:
npm install -g netlify-cli - Build:
npm run build - Deploy:
netlify deploy --prod
Docker
Docker
Create a Build and run:
Dockerfile:Static export
Static export
For static hosting (GitHub Pages, S3, etc.):
- Add to
next.config.ts:
- Build:
npm run build - Deploy the
outfolder
Troubleshooting
Installation fails with permission errors
Installation fails with permission errors
If you encounter permission errors on macOS/Linux, avoid using
sudo. Instead, configure npm to use a different directory:Dependencies take too long to install
Dependencies take too long to install
Try using pnpm which uses a content-addressable store for faster installs:
Build fails with TypeScript errors
Build fails with TypeScript errors
Ensure you’re using TypeScript 5:
Development server won't start
Development server won't start
Clear Next.js cache and try again:
Next steps
Now that you have Animation Playground installed:Quickstart guide
Create your first animation in 5 minutes
Core concepts
Learn about transforms, timing functions, and animation principles
Examples
Explore real-world animation patterns and techniques
Performance
Optimize animations for smooth 60 FPS performance