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

Feature request: more control on topbar slots #4662

Open
rkristelijn opened this issue Feb 6, 2025 · 3 comments · May be fixed by #4820
Open

Feature request: more control on topbar slots #4662

rkristelijn opened this issue Feb 6, 2025 · 3 comments · May be fixed by #4820
Assignees
Labels
scope: toolpad-core Abbreviated to "core"

Comments

@rkristelijn
Copy link
Contributor

rkristelijn commented Feb 6, 2025

Summary

We would like to add a shopping cart icon next to the existing slot on the top right. How can we extend the layout to support more slots? Would it be preferable for us to submit a merge request?

Examples

Image

Image

Motivation

Motivation
If you want a custom search bar, you can misuse css and scope of the account slot, however there should be a way to fully override that part of the dashboard layout and provide your own, in your own order.

This issue first contained the request for the top menu, but that has been split off to #4821

Search keywords: topbar navigation, top menu, custom slots, shopping cart

@rkristelijn rkristelijn added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Feb 6, 2025
@rkristelijn rkristelijn changed the title Topbar navigation Topbar navigation and shopping cart slot Feb 6, 2025
@apedroferreira
Copy link
Member

apedroferreira commented Feb 6, 2025

Hi, we have an issue for allowing navigation with tabs instead of sidebar in #4544.
But there's no timeline for when it might actually be prioritized and worked on...

As for the shopping cart item, it's maybe not the most elegant way and we could create an extra slot for actions on the right side, but you should be able to use something like:

import { Account } from '@toolpad/core/Account';

//...
slots={{ toolbarAccount: () => <><Account />{ /* your shopping cart button */ }</> }}
// ...

in the DashboardLayout component props.

@zannager zannager added the scope: toolpad-core Abbreviated to "core" label Feb 12, 2025
@Janpot
Copy link
Member

Janpot commented Feb 17, 2025

It seems a bit strange to me that the theme switcher is inside of the ToolparActions slot, and the account control is outside. If both were inside, there would be more control over how to render those. It would be a breaking change.

@Janpot Janpot removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Feb 17, 2025
@rkristelijn rkristelijn linked a pull request Mar 31, 2025 that will close this issue
4 tasks
@rkristelijn
Copy link
Contributor Author

rkristelijn commented Mar 31, 2025

I'm going to split off the request for the top menu as a separate issue

@rkristelijn rkristelijn changed the title Topbar navigation and shopping cart slot Feature request: more control on topbar slots Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: toolpad-core Abbreviated to "core"
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

4 participants