Text Path
Animated text that follows an SVG path with GSAP
text-path-tw
Customize
Tweak the props liveText
50
0
Path
1
Animation
21
Props
| Name | Type | Default | Description |
|---|---|---|---|
text | string | "Your text goes here" | The text content to animate along the path. |
path | string | "" | SVG path data string (the 'd' attribute value). The text will animate along this path. |
className | string | "" | Additional CSS classes for the container. |
duration | number | 21 | Animation duration in seconds for one complete loop around the path. |
reversed | boolean | false | Reverse the animation direction. When true, text moves counterclockwise. |
fontSize | string | "17px" | Font size for the text. Accepts any valid CSS font-size value. |
letterSpacing | string | "normal" | Letter spacing for the text. Accepts any valid CSS letter-spacing value. |
viewBox | string | "0 0 240 240" | SVG viewBox attribute. Adjust to match your path dimensions for proper rendering. |
pathScale | number | 1 | Scale factor for the entire path. Values > 1 make it larger, < 1 make it smaller. |
textstringThe text content to animate along the path.
Default:
"Your text goes here"pathstringSVG path data string (the 'd' attribute value). The text will animate along this path.
Default:
""classNamestringAdditional CSS classes for the container.
Default:
""durationnumberAnimation duration in seconds for one complete loop around the path.
Default:
21reversedbooleanReverse the animation direction. When true, text moves counterclockwise.
Default:
falsefontSizestringFont size for the text. Accepts any valid CSS font-size value.
Default:
"17px"letterSpacingstringLetter spacing for the text. Accepts any valid CSS letter-spacing value.
Default:
"normal"viewBoxstringSVG viewBox attribute. Adjust to match your path dimensions for proper rendering.
Default:
"0 0 240 240"pathScalenumberScale factor for the entire path. Values > 1 make it larger, < 1 make it smaller.
Default:
1