Circle Annotation
A hand-drawn circle scribbled around the text with generous inner padding, drawn on when scrolled into view. Built on rough.js so the loop is an authentic sketchy ellipse - never a perfect SVG oval.
Installation
npx stepwise-ui add circle-annotation
Depends on roughjsfor the hand-drawn geometry.
Props
PropTypeDescription
childrenReact.ReactNodeThe text (or nodes) to circle.
colorstringTints text and stroke when set. Default currentColor.
thicknessnumberStroke width in px. Scales from font size when omitted.
roughnessnumberSketchiness (rough.js roughness). Default 1.6.
paddingnumberGap between text and the loop, px. Scales from font size when omitted (min 14).
durationnumberDraw-on duration in seconds. Default 1.25.
delaynumberPause before the draw begins, in seconds. Default 0.25.
staggernumberDelay between loops when doubleStroke is on. Default 0.2.
doubleStrokebooleanDraw a second loop for the classic double-circled look. Default true.
replayInViewbooleanReplay the draw each time it scrolls into view. Default false.
classNamestringTailwind classes for font size, weight, and tracking.