Link

A link component that can be used to navigate to a different page or section of the current page.

Examples

Linking inline text

A common use case is using the <Link> inline.

By continuing to use this website, you agree to our use of cookies.

If you want the link to open in a new tab, use the isExternal prop.

Usage with routing libraries

To use the Link with a routing library such as React Router or with Next <Link>, all you need to do is pass the as prop. It'll replace the rendered <a> tag with the component you passed.

API Reference

PropDefaultDescription
as?-"a"
href?-string

The URL to link to.

isExternal?-boolean

If true, the link will open in new tab