README
Lottie Editor
A fully-featured Lottie animation editor and player built with React, TypeScript, Tailwind CSS, and shadcn/ui.
๐ Quick Start
The app is currently running at: http://127.0.0.1:3001
Build and Serve
bash
npm install
npm run build
npx http-server dist -p 3001
Development (requires fixing file watchers)
bash
npm run dev
โจ Features
- Visual Canvas Editor - Draw and edit shapes with drag & drop
- Tool Palette - Rectangle, Circle, Line, Text, Pen, Star, Heart, Triangle, Hexagon
- Properties Panel - Edit position, size, colors, opacity, rotation, scale
- Timeline & Keyframes - Create animations with frame-by-frame control
- Animation Player - Preview with playback controls and speed adjustment
- Import/Export - 100% Lottie JSON format compatible
- Pre-made Examples - Basic Shapes, Loading Spinner, Flying Bird, Talking Head
๐ Usage Guide
1. Load an Example
Click any example button in the header to load a pre-made animation:- Basic Shapes - Rotating square, bouncing circle, scaling triangle
- Loading Spinner - Animated rotating loader
- Flying Bird - Bird with flapping wings animation
- Talking Head - Animated face with blinking eyes and moving mouth
2. Create Shapes
- Select a tool from the left palette
- Click and drag on canvas to draw
- Or drag a shape directly from palette to canvas
3. Edit Properties
- Click to select any shape
- Use the right properties panel to adjust:
4. Add Animations
- Use the timeline at the bottom
- Click on frames to add keyframes for any property
- Expand shape tracks to see all animatable properties
- Click keyframe dots to add/remove keyframes
5. Preview & Export
- Switch to Preview tab to see the final Lottie animation
- Use playback controls (Play, Pause, Reset)
- Adjust playback speed
- Click Export to download as Lottie JSON
๐จ Animatable Properties
All shapes support animation for:
- Position (x, y)
- Rotation
- Scale (x, y)
- Opacity
- Size properties (width, height, radius)
๐ง Tech Stack
- React 18 + TypeScript
- Vite - Lightning fast build tool
- Tailwind CSS - Utility-first styling
- shadcn/ui - Beautiful UI components
- lottie-web - Lottie animation playback
- @dnd-kit - Modern drag and drop
- lucide-react - Icon library
๐ Project Structure
shell
src/
โโโ components/
โ โโโ editor/
โ โ โโโ Canvas.tsx # Main drawing canvas
โ โ โโโ Editor.tsx # Main editor layout
โ โ โโโ PropertiesPanel.tsx # Shape property editor
โ โ โโโ Timeline.tsx # Animation timeline
โ โ โโโ ToolPalette.tsx # Drawing tools
โ โโโ lottie/
โ โ โโโ LottiePlayer.tsx # Lottie playback component
โ โโโ ui/ # shadcn/ui components
โโโ data/
โ โโโ examples/ # Pre-made animations
โโโ lib/
โ โโโ lottieConverter.ts # Convert to/from Lottie format
โ โโโ utils.ts
โโโ types/
โโโ lottie.ts # Lottie format TypeScript types
๐ญ Example Animations
The editor includes 4 pre-made Lottie-compatible animations:
๐พ Lottie Compatibility
This editor generates 100% standard Lottie JSON that works with:
- LottieFiles - Upload and share
- After Effects - Import via Bodymovin plugin
- Mobile Apps - iOS (Lottie-iOS) and Android (Lottie-Android)
- Web - lottie-web, @lottiefiles/react-lottie-player
- React Native - lottie-react-native
๐ Known Issues
- File watcher limit error in dev mode (fixed by serving built files)
- Some complex SVG paths may not convert perfectly to Lottie format
๐ License
MIT