Link
The Link component uses Payload's router adapter and route-transition state. Use it for links between Admin Panel routes.
Import
Inside a Payload Admin Panel Custom Component:
You can also import the component directly:
Basic usage
Link supplies navigation behavior but does not add visual styling. Pass a className when the link needs its own visual treatment.
The Admin Panel supplies the router and route-transition contexts used by the component.
Common props
These are the props most commonly used with this component. See its exported types in @payloadcms/ui for the complete list.
Prop | Type | Default | Description |
|---|---|---|---|
| | — | Destination passed to Payload's router adapter. |
| | | Replaces the current history entry instead of adding one. |
| | | Controls whether navigation scrolls to the new page. |
| | — | Controls route prefetching when the adapter supports it. |
| | | Lets Payload manage navigation and route-transition state. |
| | | Uses a hard browser navigation instead of client routing. |
| | — | Runs before navigation begins. |
* An asterisk denotes that a prop is required.
Was this page helpful?