Link

Import
import Link from 'react-storefront/Link'

Props

NameTypeDefaultDescription
tostring

The path to navigate to when the link is clicked

stateunion : object |
func

Data to assign to the history state

serverbool

Set to true to force server side navigation. Defaults to false

prefetchenum : 'always' |
'visible'

Set to "visible" to prefetch linked page data when the link is scrolled into view.
Set to "always" to prefetch even when the link is hidden.

prefetchURLstring

Set this prop to prefetch a URL other than the one specified in the to prop

onClickfunc

A function to call when the link is clicked.

anchorPropsobject{}

Props to apply to the underlying html anchor element

CSS API

You can override all the class names injected by Moov-PWA thanks to the classes property. This property accepts the following keys:

  • root