You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/custom-components/root-components.mdx
+60Lines changed: 60 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,7 @@ The following options are available:
45
45
|`header`| An array of Custom Components to be injected above the Payload header. [More details](#header). |
46
46
|`logout.Button`| The button displayed in the sidebar that logs the user out. [More details](#logoutbutton). |
47
47
|`Nav`| Contains the sidebar / mobile menu in its entirety. [More details](#nav). |
48
+
|`settingsMenu`| An array of Custom Components to inject into a popup menu accessible via a gear icon above the logout button. [More details](#settingsMenu). |
48
49
|`providers`| Custom [React Context](https://react.dev/learn/scaling-up-with-reducer-and-context) providers that will wrap the entire Admin Panel. [More details](./custom-providers). |
49
50
|`views`| Override or create new views within the Admin Panel. [More details](./custom-views). |
50
51
@@ -271,6 +272,65 @@ export default function MyAfterNavLinksComponent() {
271
272
}
272
273
```
273
274
275
+
### settingsMenu
276
+
277
+
The `settingsMenu` property allows you to inject Custom Components into a popup menu accessible via a gear icon in the navigation controls, positioned above the logout button. This is ideal for adding custom actions, utilities, or settings that are relevant at the admin level.
278
+
279
+
To add `settingsMenu` components, use the `admin.components.settingsMenu` property in your Payload Config:
You can pass multiple components to create organized groups of menu items:
317
+
318
+
```ts
319
+
import { buildConfig } from'payload'
320
+
321
+
exportdefaultbuildConfig({
322
+
// ...
323
+
admin: {
324
+
components: {
325
+
settingsMenu: [
326
+
'/components/SystemActions#SystemActions',
327
+
'/components/DataManagement#DataManagement',
328
+
],
329
+
},
330
+
},
331
+
})
332
+
```
333
+
274
334
### Nav
275
335
276
336
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.
0 commit comments