AnimationsNew

Elastic Line

A line catches the cursor, stretches after it and springs back when released. A playful divider for landing pages.

Customize

color
grabColor

Based on Elastic Line (MIT license) · Terms of use

More in Pro

View all

Props

9 properties
PropertyTypeDefaultDescription
isVerticalbooleanfalseVertical line instead of horizontal.
grabThresholdnumber5How close the cursor must get to grab the line, in pixels.
releaseThresholdnumber100How far the line stretches before it snaps free, in pixels.
strokeWidthnumber1Line thickness.
transitionValueAnimationTransition"{ type: 'spring', stiffness: 300, damping: 5 }"Spring used when the line snaps back.
animateInTransitionValueAnimationTransition"{ duration: 0.3, ease: 'easeInOut' }"How the line draws itself on mount.
colorstring"#ffffff"Colour of the line at rest.
grabColorstring"#ffffff"Colour of the line while the cursor holds it.
classNamestring—Classes for the SVG. The line takes the text color.

Dependencies

1 required package

npm install motion

Related components

View all