terra vidhal

Motion Keyframe Editor

Component

About

A motion keyframe editor with five transform tracks, draggable playhead, live preview stage, per-property keyframes, easing curves, an inspector, playback and loop controls, and generated CSS export.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Motion Keyframe Editor to your project and fits it to your theme.

Code

How Motion Keyframe Editor is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

/**
 * PrequelUI Animate — MIT — https://prequeluianimate.terravidhal.me
 */

import {
  MotionKeyframeEditor,
  type MotionKeyframes,
} from "@/components/ui/motion-keyframe-editor";

const KEYFRAMES: MotionKeyframes = {
  x: [
    { id: "x-1", time: 0, value: 0, easing: "easeInOut" },
    { id: "x-2", time: 1.2, value: 80, easing: "easeInOut" },
    { id: "x-3", time: 2.4, value: 0, easing: "easeInOut" },
  ],
  y: [
    { id: "y-1", time: 0, value: 0, easing: "easeOut" },
    { id: "y-2", time: 0.9, value: -40, easing: "easeInOut" },
    { id: "y-3", time: 1.8, value: 24, easing: "easeInOut" },
    { id: "y-4", time: 2.4, value: 0, easing: "easeInOut" },
  ],
  scale: [
    { id: "s-1", time: 0, value: 0.8, easing: "easeOut" },
    { id: "s-2", time: 0.8, value: 1.15, easing: "easeInOut" },
    { id: "s-3", time: 1.6, value: 1, easing: "easeInOut" },
  ],
  rotate: [
    { id: "r-1", time: 0, value: 0, easing: "easeInOut" },
    { id: "r-2", time: 1.2, value: 90, easing: "easeInOut" },
    { id: "r-3", time: 2.4, value: 180, easing: "easeOut" },
  ],
  opacity: [
    { id: "o-1", time: 0, value: 0.2, easing: "easeOut" },
    { id: "o-2", time: 0.5, value: 1, easing: "easeInOut" },
    { id: "o-3", time: 2.2, value: 1, easing: "linear" },
    { id: "o-4", time: 2.4, value: 0.4, easing: "easeInOut" },
  ],
};

export default function MotionKeyframeEditorDemo() {
  return (
    <main className="flex min-h-screen w-full items-center justify-center bg-gradient-to-b from-muted/40 via-background to-background px-4 py-8 sm:px-6">
      <MotionKeyframeEditor
        initialKeyframes={KEYFRAMES}
        duration={2.4}
        title="Intro card · motion study"
        description="A single layer with five animated properties. Scrub the timeline, tune the easing, then copy the CSS."
      />
    </main>
  );
}

Dependencies

More by terra vidhal

View all
  • Project Timeline

    Project Timeline

    30
  • Kanban Board

    Kanban Board

    20
  • Gravity Stars Background

    Gravity Stars Background

    20
  • Booking Calendar

    Booking Calendar

    18
  • Notification Center

    Notification Center

    16
  • Audio Waveform

    Audio Waveform

    16
  • Kpi Counter

    Kpi Counter

    16
  • Topographic Lines

    Topographic Lines

    16