The string's midpoint displacement is a single damped sine wave: displacement(t) = amplitude × e^(−decay × t) × sin(frequency × t). As time passes, the e^(−decay × t) term shrinks toward zero, so the amplitude decays and the string eventually settles back to a straight line. Feed that displacement as the control point of a quadratic Bézier curve running through the string's center — offset perpendicular to the string — and the whole line reads as one smoothly bowed curve.
A real guitar string mixes in harmonics for a more complex waveform, but for UI purposes a single decaying sine is plenty to sell "plucked, then settling." Randomizing the pluck strength (amplitude) slightly each time keeps repeats from looking identical.
Paired with an actual drag-and-release interaction — where how far you pulled sets the amplitude — this is the physical justification behind rubber-band-style UI (pull to refresh, swipe resistance). There, it's not a literal string but the element's own edge that bows, so you drive a clip-path or an SVG path's control point with the same formula instead.
When to use
Use it to give a pull-and-release gesture physical grounding — pull to refresh, the ends of a drag slider. As pure decoration it can feel like too much detail, so pair it with an actual interaction.