Menu
The sidebar menu is generated from the service schemas — you do not build it, you adjust it.
SchemaLayout assembles it from the loaded service schemas and hands the result to
DashboardLayout's menu slot. The only supported way
to influence it is the extraMenuItems prop.
How the menu is assembled
- Every service in
serviceConfigMapcontributes its resources. A service with alabelbecomes a top-level group; a service without one has its resources placed at the top level. - A resource appears when its schema carries a
menuentry —type: 'view'linking to one of the resource's views, ortype: 'link'pointing at a URL (onlyhttp,httpsand relative URLs are opened — see link actions). The menu is nevertheless permission-aware, because a resource the user cannot read is not in their schema. - The service schema's own
MenuGroupSchemadecides grouping, labels and icons. extraMenuItemsfrom SchemaAdmin is merged in last: an item whosekeymatches a generated entry patches it, any other key adds a new entry.- Everything is sorted by
priority, ascending; the default is100.
Replacing the menu entirely
The assembled menu is a LayoutMenuItem[] — a nested structure of title, icon, href and children.
DashboardLayout renders it from its menu slot, which also accepts a Component of your own:
<DashboardLayout menu={{items: menuItems, Component: MyMenu}}>{children}</DashboardLayout>
The hook that builds the menu is internal to SchemaAdmin and is not exported from the
package — it needs the resource definitions that only exist inside React Admin's <Admin>. A
custom LayoutComponent receives the generated items as the layout's menu slot; it does not
rebuild them.
To reorder the generated menu, do not rebuild it: give an extraMenuItems entry the key of the
generated item and only set priority. Everything else stays as generated.
See also
- SchemaAdmin — the
extraMenuItemsprop - Menu customisation — shaping the menu on the Python side
- Navigation and branding — the same on the Ruby side