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

[DashboardLayout] Improve header title customizability #4342

Closed
apedroferreira opened this issue Oct 31, 2024 · 5 comments · Fixed by #4477
Closed

[DashboardLayout] Improve header title customizability #4342

apedroferreira opened this issue Oct 31, 2024 · 5 comments · Fixed by #4477
Assignees
Labels
component: layout This is the name of the generic UI component, not the React module! scope: toolpad-core Abbreviated to "core"

Comments

@apedroferreira
Copy link
Member

apedroferreira commented Oct 31, 2024

Summary

Right now, customization options for the title that shows in the layout header are quite limited.
Even though it might be possible to do it by using the sx prop in DashboardLayout and targeting the correct element, we could find ways to make that title more straightforward to customize, as it might be something many users want more control over.

A simple, flexible solution might just be adding a new slot for that title.

Examples

No response

Motivation

User feedback on docs: "How to style the branding title? Can I change it to a component instead of a text?"

Search keywords: dashboard layout header branding title appbar style

@prakhargupta1
Copy link
Member

Relates to: #4450

@mkarajohn
Copy link

+1 for this.

title as string is rather limiting, it should be able to accept full ReactNodes or make it work like a slot, ala toolbar.

For the record, passing a ReactNode to title right now works, with only TS throwing a type error

@Janpot
Copy link
Member

Janpot commented Dec 5, 2024

For the record, passing a ReactNode to title right now works, with only TS throwing a type error

This would be my least favourite solution as I could imagine we'd want future use cases where no React host is available. But I could see a slot or a render prop work well.

@mkarajohn
Copy link

mkarajohn commented Dec 5, 2024

Oops, @Janpot I want to issue a correction: I thought this was about the title in the PageContainer, and that's where my comment was applying to!

I'll see if there's a request-issue for PageContainer's title

@github-project-automation github-project-automation bot moved this from In progress to Completed in MUI Toolpad public roadmap Dec 8, 2024
Copy link

github-actions bot commented Dec 8, 2024

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

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: Completed
Development

Successfully merging a pull request may close this issue.

6 participants