Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Link

The Link component integrates Next.js navigation with Payload's route-transition state. Use it for links between Admin Panel routes.

Import

1
import { Link } from '@payloadcms/ui'

Basic usage

Loading component example…

Link does not add visual styling. It inherits typography and color from the surrounding Admin Panel interface.

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

href *

string | UrlObject

Destination passed to the Next.js router.

replace

boolean

false

Replaces the current history entry instead of adding one.

scroll

boolean

true

Controls whether navigation scrolls to the new page.

prefetch

boolean

Controls Next.js route prefetching.

preventDefault

boolean

true

Lets Payload manage navigation and route-transition state.

onClick

MouseEventHandler

Runs before navigation begins.

* An asterisk denotes that a prop is required.

Was this page helpful?

Next

List and Pagination Controls