Platinum sponsors

Keyframes

Add, move, copy and delete the keyframes of a property.

The Anime.js editor timeline with the cube dot pop row expanded and the keyframes of each property as diamonds

The editor reads and writes them as tween parameters keyframes, an array of tween parameters on each property:

animate('.square', {
  id: 'Square path',
  x: [{ to: 100, duration: 400 }, { to: 0, duration: 300 }],
});

Add a keyframe

  • Move the playhead, then press Shift + K to insert a keyframe on the active row.
  • Or click the diamond button next to a value in the Target folder. Click it again on a keyframe to remove it.
  • Or right-click a property segment and pick Add keyframe at playhead.
  • With Editor Kit, each gizmo gesture writes a keyframe at the playhead.

A property with a single value becomes a keyframe array when you add its second keyframe.

The Anime.js editor right-click menu of a property segment, with Add keyframe at playhead

Select and move

  • Click a keyframe to select it. The Tween folder shows its to, from, duration, delay, ease, composition and muted.
  • Shift + click adds keyframes to the selection. Drag over the timeline to select keyframes inside a rectangle.
  • Drag selected keyframes to move them in time.
  • Double-click a keyframe to move the playhead onto it.

Copy, paste and duplicate

Action How
Copy Cmd + C, or right-click a keyframe and pick Copy keyframes
Paste at the playhead Cmd + V, or right-click a keyframe and pick Paste keyframes
Duplicate Hold Alt while you drag selected keyframes
The Anime.js editor right-click menu of a keyframe, with Copy keyframes and Delete keyframe

Delete

Press Backspace, or right-click a keyframe and pick Delete keyframe. Deleting all the keyframes of a property deletes the property.

Animation keyframes, the keyframes parameter of duration based and percentage based keyframes, still play but are not editable. Write keyframes on each property, as above, to edit them.

Previous
Next