Skip to content

Draw & Write

0.00s / 2.97s · F0

Progressively reveals the stroke of a shape using strokeDashoffset. Works best with stroke-based shapes such as Circle, Line, Arrow, Rect, and Polygon.

PropTypeDescription
durationnumberLength of the animation in frames
childrenReactNodeStroke-based shapes to reveal
<Draw duration={45}>
<Circle cx={200} cy={150} r={60} stroke="#4f9eff" strokeWidth={3} fill="none" />
</Draw>

Reveals text with a combined opacity and scale animation.

PropTypeDescription
durationnumberLength of the animation in frames
childrenReactNodeText elements to reveal
<Write duration={30}>
<Text x={200} y={150} fontSize={24} fill="#fff">Hello</Text>
</Write>
import { Player, Draw, Write, Circle, Rect, Text } from '@elucim/core';
<Player width={500} height={250} fps={30} durationInFrames={90}>
<Draw duration={40}>
<Circle cx={125} cy={125} r={60} stroke="#6c5ce7" strokeWidth={3} fill="none" />
</Draw>
<Write duration={30}>
<Text x={125} y={130} fill="#6c5ce7" fontSize={16} textAnchor="middle">Draw</Text>
</Write>
</Player>