A component that will render a client-side routed nextjs link for local paths, and a normal
<a> element for external links. If you do not pass a
Link prop, it will render normal links in all cases.
href passed to this component expects relative urls to be used for internal routes, and absolute urls to be used for external routes.
If this condition is not true, the links may not behave properly. Specifically, in the context of NextJS, this can result in internal links not using client-side transitions, or external links being erroneously prefetched. More info in this PR, and this open issue could result in changes to this behavior.
<LinkWrap href='https://www.hashicorp.com'>test link</LinkWrap>
The props listed below directly affect the behavior of this component. Any other props that are passed will be reflected on to the
<a> element internally, so you can still pass things like
children, etc and they will work correctly.
|Path to an internal or external route.|
|Path rendered in the browser URL bar, used for dynamic routes.|
|Whether to prefetch the page in the background|
|Whether to replace the current |
|Whether to force the window scroll and focus to reset after navigation|
|Whether to change the URL without running |