Back to Lottie Editor

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:
- Position (X, Y) - Size (Width, Height, Radius) - Colors (Fill, Stroke) - Stroke Width - Opacity - Rotation - Scale

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:

  • basicShapes.json - Demonstrates rotation, bounce, and scale animations
  • loadingSpinner.json - 8-bar rotating spinner with opacity fade
  • flyingBird.json - Bird with wing flapping and movement across screen
  • talkingHead.json - Animated character with blinking and mouth movement
  • ๐Ÿ’พ 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

    ยฉ 2026 Jonathan Leahy ยท v0.8.1-31-g196fa14