TextNew

Comes In Goes Out Underline

On hover a line slides in under the link from one side and leaves through the other when the cursor goes away. A clean effect for navigation.

Customize

underlineFrom
underlineTo

Based on Underline Comes In Goes Out (MIT license) · Terms of use

More in Pro

View all

Props

9 properties
PropertyTypeDefaultDescription
childrenReactNode—The link text.
direction'left' | 'right'"left"Which side the line comes in from.
underlineHeightRationumber0.1Line thickness relative to the font size.
underlinePaddingRationumber0.01Gap between line and text relative to the font size.
transitionValueAnimationTransition"{ duration: 0.4, ease: 'easeInOut' }"Duration and easing of the line.
asElementType"span"HTML tag of the element.
classNamestring—Extra classes.
underlineFromstring"#ffffff"Colour at the start of the underline. It fades into the second colour.
underlineTostring"#a1a1aa"Colour at the end of the underline.

Dependencies

2 required packages

npm install clsx motion

Related components

View all