Bend Text, animated React component
A line of type running along a string that you can grab and pull, with the words flowing round the bend. Let go and an underdamped spring twangs it back, overshooting a few times before it lies flat.
- Pro
- Motion Effects
- Spring
Play with it
Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.
Grab the line, pull, and let go.
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| text | string | "PLUCK THE LINE · MAKE IT SING · " | One repeat of the text on the string; it is repeated four times so the line stays full. |
| accent | string | "#0071e3" | Colour of the grab point and the focus ring. |
| hint | string | "Grab the line, pull, and let go." | Caption under the stage. An empty string hides it. |
| onPluck | (pull: number) => void | — | Called on release with how far the string was pulled from rest, in stage units. |
| autoplay | boolean | false | Plucks the string every 2.6s until someone touches it. |
| className | string | — | Extra classes for the root element. |