Vector and paint · Stroke animations
Documentation

Stroke animations

Trim, offset, taper, direction and presets for strokes, plus marching ants and layers that follow a path.

Any stroke on a vector path can animate how much of it is drawn. Open the border's details (the slider button next to the border width, “Dash, gap, caps, joins and draw-on”) to find the Draw section. Dashed borders on any shape can also flow.

Stroke draw controls: presets, trim, direction and taper

Presets

Draw On (or Redo Draw On once a trim exists) and the presets menu next to it add a complete stroke animation from the playhead. The same presets are in the timeline's lane menu under Stroke Animation, for every selected layer at once.

PresetWhat it doesWorks on
Draw OnDraws the stroke in: trim end 0 → 1, 0.8 s, ease-in-outVector paths
Draw OffErases it from the start: trim start 0 → 1, 0.8 s, ease-in-outVector paths
Write OnHandwriting: round caps and joins, a 1.2 s draw-onVector paths
TraceA 25 % segment travels along the path, looping (trim offset, linear)Vector paths
PulseOne segment runs along the path once (the end leads, the start follows 0.3 s later)Vector paths
Dash FlowDashes flow along the stroke and loop (dash offset, linear). Adds a dash if there is noneAny border

Trim start, end and offset

FieldRangeDefaultMeaning
Start0–100 %0 %Where the visible part begins
End0–100 %100 %Where it ends. Animate from 0 to 100 % for a draw-on
OffsetAny; 100 % = one lap0 %Shifts the visible part along the path. It wraps around closed paths

Click ◆ next to a value to key it at the playhead and build your own draw-on. The diamond fills when a key sits at the playhead and lights up when the value is animated.

Paths, direction and taper

ControlOptionsWhat it does
PathsOne by One (default), TogetherShown for paths with several parts. One by One treats them as one continuous stroke, drawn one after another; Together trims every part at the same time
Stagger (with Together)0–100 %, steps of 50 % draws all parts together, 100 % strictly one after another
DirectionReverse, From CentreReverse draws from the end toward the start; From Centre draws from the middle outward
TaperStart and end, 0–100 %, steps of 5Narrows the stroke's start (tail) and end (head) to a point over that share of its length, for a brush-like draw-on

Marching ants

  1. Give the border a dash in the details (Dash and gap, or a preset: Dash or Dot).
  2. Click Animate Dashes. The dashes travel along the stroke and loop seamlessly until the end of the scene.
  3. Tune the speed by keying dashOffset in the timeline. Restart Dash Loop rebuilds the loop after you change the dash.

Follow a path

A layer can travel along a path, for example a dot along a curve, and turn with it (auto-orient). Ask the AI: “let the plane follow the dashed path and rotate along it”. The progress along the path is a normal property (pathProgress, 0 to 1) you can key and ease in the timeline.

In exports

FeatureLottieWeb (HTML, CSS, React, Web Animations)SwiftUI
Trim start, end, offsetNative Trim PathspathLength with dash arrays.trim(from:to:), offsets split where they wrap
Reverse, From Centre, staggerSplit into groups, sampledOne stroke element per part (CSS: reverse and centre only)Reverse and centre no; the path trims as one stroke
TaperUniform widthUniform widthUniform width
Dash flowAnimated dash offsetAnimated stroke-dashoffset (not in CSS)Static dashes at the first offset

Works with

Troubleshooting

If this happensTry this
Draw On is greyed out in the lane menuThe layer isn't a vector path. Trim works on paths; only Dash Flow works on any border. Convert shapes with ⇧⌘P.
The draw starts at the wrong endTurn on Reverse, or use Stage → Reverse Path Direction.