runway

Runway

TextLink

A text link component that can be used to navigate to other pages.



The TextLink component is built on top of the Link component from Next.js. It comes with additional features such as hover effects, icon support, and more.

If you don't need any of the additional features, you can use Next.js's built-in Link component.



Usage

javascript

1import TextLink from "@/components/atoms/TextLink";
2
3<TextLink href="/docs/components/text-link">
4    Go to TextLink
5</TextLink>



Props

The TextLink component accepts the following props:

NameTypeDefaultDescription
childrenReactNode-The content of the link.
hrefstring-The URL to navigate to when the link is clicked.
colorstringgrayThe color of the link (see tailwind.config).
iconIcon-An optional icon to display before the text.
scalebooleanfalseIf true, the link will grow on hover.
liftbooleanfalseIf true, the link will lift on hover.
fadebooleanfalseIf true, the link will fade on hover.
underlinebooleanfalseIf true, the link will be underlined on hover.
activebooleantrueIf true, the link will be underlined when active.
underlineClassNamestring""Additional classes for the underline.
underlineHeightnumber1Height of the underline (in px).
underlineOffsetnumber10Offset of the underline (in px).
classNamestring""Additional Tailwind classes for the container.
...propsobject-Any other valid <a> attributes (e.g. target, rel, etc.).



Examples

Basic Text Link

You can use different hover effects (scale, lift, fade, underline), colors (color), and active states (active) to customize the link.


Text Link with Icon