Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customization of Navigation Menu Items #4581

Open
AniketUndalekar1997 opened this issue Jan 9, 2025 · 3 comments
Open

Customization of Navigation Menu Items #4581

AniketUndalekar1997 opened this issue Jan 9, 2025 · 3 comments
Labels
component: layout This is the name of the generic UI component, not the React module! scope: toolpad-core Abbreviated to "core"

Comments

@AniketUndalekar1997
Copy link

AniketUndalekar1997 commented Jan 9, 2025

Summary

It would be greatly beneficial to have more customization options for navigation menu items. Specifically, I have the following requests:

Prevent Default Routing: Currently, certain menu items default to routing to /. It would be useful to have a way to prevent this default behavior on selected menu items.

Custom Styling:

Increase spacing between menu items: The ability to adjust the spacing between individual menu items would improve the visual layout and readability.

Font size adjustment for NavigationSubheaderItem: A method to increase the font size of NavigationSubheaderItem would enhance its prominence and legibility.

Providing these customization options would significantly enhance the flexibility and usability of the navigation menu.

Examples

Screenshot 2025-01-09 at 12 37 38 PM

Motivation

Customizable navigation menus enhance user experience by allowing more control over the interface. Providing options to prevent default routing, adjust spacing, and change font sizes can lead to a more intuitive and visually appealing navigation system. These features ensure the menu aligns with the overall design and usability goals, offering a more personalized and accessible experience.

Search keywords: Customization of Navigation Menu Items

@AniketUndalekar1997 AniketUndalekar1997 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jan 9, 2025
@apedroferreira
Copy link
Member

Hi, looks like a renderItem property as discussed in #4413 would help fix most of your issues.
For the spacing and typography, you might be able to use the sx prop in DashboardLayout and target the elements you mean to customize.

@apedroferreira apedroferreira added component: layout This is the name of the generic UI component, not the React module! scope: toolpad-core Abbreviated to "core" and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 9, 2025
@AniketUndalekar1997
Copy link
Author

@apedroferreira, could you share documentation for this if available ?

@apedroferreira
Copy link
Member

apedroferreira commented Jan 10, 2025

@apedroferreira, could you share documentation for this if available ?

Adding renderItem to navigation items is in our backlog, but we might be able to prioritize it as it seems quite a few people would find it useful.

About the sx prop, it's only really listed here in the DashboardLayout API docs page: https://mui.com/toolpad/core/api/dashboard-layout/
With the sx prop object you should be able to do something like this, for example:

sx={{
  '& .MuiListSubheader-root': {
    fontSize: '1.2rem',
  },
}}

If this helps solve some of your issues and it wasn't super clear how to use maybe we document it more clearly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: layout This is the name of the generic UI component, not the React module! scope: toolpad-core Abbreviated to "core"
Projects
Status: Backlog
Development

No branches or pull requests

2 participants