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.

Root Components

Root Components are those that affect the Admin Panel at a high-level, such as the logo or the main nav. You can swap out these components with your own Custom Components to create a completely custom look and feel.

When combined with Custom CSS, you can create a truly unique experience for your users, such as white-labeling the Admin Panel to match your brand.

To override Root Components, use the admin.components property at the root of your Payload Config:

1
import { buildConfig } from 'payload'
2
3
export default buildConfig({
4
// ...
5
admin: {
6
components: {
7
// ...
8
},
9
},
10
})

Config Options

The following options are available:

Path

Description

actions

An array of Custom Components to be rendered within the header of the Admin Panel, providing additional interactivity and functionality. More details.

afterDashboard

An array of Custom Components to inject into the built-in Dashboard, after the default dashboard contents. More details.

afterLogin

An array of Custom Components to inject into the built-in Login, after the default login form. More details.

afterNavLinks

An array of Custom Components to inject into the built-in Nav, after the links. More details.

beforeDashboard

An array of Custom Components to inject into the built-in Dashboard, before the default dashboard contents. More details.

beforeLogin

An array of Custom Components to inject into the built-in Login, before the default login form. More details.

beforeNavLinks

An array of Custom Components to inject into the built-in Nav, before the links themselves. More details.

graphics.Icon

The simplified logo used in contexts like the the Nav component. More details.

graphics.Logo

The full logo used in contexts like the Login view. More details.

header

An array of Custom Components to be injected above the Payload header. More details.

logout.Button

The button displayed in the sidebar that logs the user out. More details.

Nav

Contains the sidebar / mobile menu in its entirety. More details.

providers

Custom React Context providers that will wrap the entire Admin Panel. More details.

views

Override or create new views within the Admin Panel. More details.

For details on how to build Custom Components, see Building Custom Components.

Components

actions

Actions are rendered within the header of the Admin Panel. Actions are typically used to display buttons that add additional interactivity and functionality, although they can be anything you'd like.

To add an action, use the actions property in your admin.components config:

1
import { buildConfig } from 'payload'
2
3
export default buildConfig({
4
// ...
5
admin: {
6
components: {
7
actions: [
8
'/path/to/your/component',
9
],
10
},
11
},
12
})

Here is an example of a simple Action component:

1
export default function MyCustomAction() {
2
return (
3
<button onClick={() => alert('Hello, world!')}>
4
This is a custom action component
5
</button>
6
)
7
}

beforeDashboard

The beforeDashboard property allows you to inject Custom Components into the built-in Dashboard, before the default dashboard contents.

To add beforeDashboard components, use the admin.components.beforeDashboard property in your Payload Config:

1
import { buildConfig } from 'payload'
2
3
export default buildConfig({
4
// ...
5
admin: {
6
components: {
7
beforeDashboard: [
8
'/path/to/your/component',
9
],
10
},
11
},
12
})

Here is an example of a simple beforeDashboard component:

1
export default function MyBeforeDashboardComponent() {
2
return (
3
<div>
4
This is a custom component injected before the Dashboard.
5
</div>
6
)
7
}

afterDashboard

Similar to beforeDashboard, the afterDashboard property allows you to inject Custom Components into the built-in Dashboard, after the default dashboard contents.

To add afterDashboard components, use the admin.components.afterDashboard property in your Payload Config:

1
import { buildConfig } from 'payload'
2
3
export default buildConfig({
4
// ...
5
admin: {
6
components: {
7
afterDashboard: [
8
'/path/to/your/component',
9
],
10
},
11
},
12
})

Here is an example of a simple afterDashboard component:

1
export default function MyAfterDashboardComponent() {
2
return (
3
<div>
4
This is a custom component injected after the Dashboard.
5
</div>
6
)
7
}

beforeLogin

The beforeLogin property allows you to inject Custom Components into the built-in Login view, before the default login form.

To add beforeLogin components, use the admin.components.beforeLogin property in your Payload Config:

1
import { buildConfig } from 'payload'
2
3
export default buildConfig({
4
// ...
5
admin: {
6
components: {
7
beforeLogin: [
8
'/path/to/your/component',
9
],
10
},
11
},
12
})

Here is an example of a simple beforeLogin component:

1
export default function MyBeforeLoginComponent() {
2
return (
3
<div>
4
This is a custom component injected before the Login form.
5
</div>
6
)
7
}

afterLogin

Similar to beforeLogin, the afterLogin property allows you to inject Custom Components into the built-in Login view, after the default login form.

To add afterLogin components, use the admin.components.afterLogin property in your Payload Config:

1
import { buildConfig } from 'payload'
2
3
export default buildConfig({
4
// ...
5
admin: {
6
components: {
7
afterLogin: [
8
'/path/to/your/component',
9
],
10
},
11
},
12
})

Here is an example of a simple afterLogin component:

1
export default function MyAfterLoginComponent() {
2
return (
3
<div>
4
This is a custom component injected after the Login form.
5
</div>
6
)
7
}

beforeNavLinks

The beforeNavLinks property allows you to inject Custom Components into the built-in Nav Component, before the nav links themselves.

To add beforeNavLinks components, use the admin.components.beforeNavLinks property in your Payload Config:

1
import { buildConfig } from 'payload'
2
3
export default buildConfig({
4
// ...
5
admin: {
6
components: {
7
beforeNavLinks: [
8
'/path/to/your/component',
9
],
10
},
11
},
12
})

Here is an example of a simple beforeNavLinks component:

1
export default function MyBeforeNavLinksComponent() {
2
return (
3
<div>
4
This is a custom component injected before the Nav links.
5
</div>
6
)
7
}

afterNavLinks

Similar to beforeNavLinks, the afterNavLinks property allows you to inject Custom Components into the built-in Nav, after the nav links.

To add afterNavLinks components, use the admin.components.afterNavLinks property in your Payload Config:

1
import { buildConfig } from 'payload'
2
3
export default buildConfig({
4
// ...
5
admin: {
6
components: {
7
afterNavLinks: [
8
'/path/to/your/component',
9
],
10
},
11
},
12
})

Here is an example of a simple afterNavLinks component:

1
export default function MyAfterNavLinksComponent() {
2
return (
3
<p>This is a custom component injected after the Nav links.</p>
4
)
5
}

Nav

The Nav property contains the sidebar / mobile menu in its entirety. Use this property to completely replace the built-in Nav with your own custom navigation.

To add a custom nav, use the admin.components.Nav property in your Payload Config:

1
import { buildConfig } from 'payload'
2
3
export default buildConfig({
4
// ...
5
admin: {
6
components: {
7
Nav: '/path/to/your/component',
8
},
9
},
10
})

Here is an example of a simple Nav component:

1
import { Link } from '@payloadcms/ui'
2
3
export default function MyCustomNav() {
4
return (
5
<nav>
6
<ul>
7
<li>
8
<Link href="/dashboard">
9
Dashboard
10
</Link>
11
</li>
12
</ul>
13
</nav>
14
)
15
}

graphics.Icon

The Icon property is the simplified logo used in contexts like the Nav component. This is typically a small, square icon that represents your brand.

To add a custom icon, use the admin.components.graphics.Icon property in your Payload Config:

1
import { buildConfig } from 'payload'
2
3
export default buildConfig({
4
// ...
5
admin: {
6
components: {
7
graphics: {
8
Icon: '/path/to/your/component',
9
},
10
},
11
},
12
})

Here is an example of a simple Icon component:

1
export default function MyCustomIcon() {
2
return (
3
<img src="/path/to/your/icon.png" alt="My Custom Icon" />
4
)
5
}

The Logo property is the full logo used in contexts like the Login view. This is typically a larger, more detailed representation of your brand.

To add a custom logo, use the admin.components.graphic.Logo property in your Payload Config:

1
import { buildConfig } from 'payload'
2
3
export default buildConfig({
4
// ...
5
admin: {
6
components: {
7
graphics: {
8
Logo: '/path/to/your/component',
9
},
10
},
11
},
12
})

Here is an example of a simple Logo component:

1
export default function MyCustomLogo() {
2
return (
3
<img src="/path/to/your/logo.png" alt="My Custom Logo" />
4
)
5
}

Header

The Header property allows you to inject Custom Components above the Payload header.

Examples of a custom header components might include an announcements banner, a notifications bar, or anything else you'd like to display at the top of the Admin Panel in a prominent location.

To add Header components, use the admin.components.header property in your Payload Config:

1
import { buildConfig } from 'payload'
2
3
export default buildConfig({
4
// ...
5
admin: {
6
components: {
7
Header: [
8
'/path/to/your/component'
9
],
10
},
11
},
12
})

Here is an example of a simple Header component:

1
export default function MyCustomHeader() {
2
return (
3
<header>
4
<h1>My Custom Header</h1>
5
</header>
6
)
7
}

logout.Button

The logout.Button property is the button displayed in the sidebar that should log the user out when clicked.

To add a custom logout button, use the admin.components.logout.Button property in your Payload Config:

1
import { buildConfig } from 'payload'
2
3
export default buildConfig({
4
// ...
5
admin: {
6
components: {
7
logout: {
8
Button: '/path/to/your/component',
9
}
10
},
11
},
12
})

Here is an example of a simple logout.Button component:

1
export default function MyCustomLogoutButton() {
2
return (
3
<button onClick={() => alert('Logging out!')}>
4
Log Out
5
</button>
6
)
7
}
Next

Swap in your own React Context providers