-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[AppBar] Prominent variant #14246
Comments
At first glance it looks like it should be trivial to implement (i.e. no significant code bloat), so no objection per-se; but I'm curious since we've had no requests up to now - do you have a use for this, or are you pointing out a gap vs the spec? (If it's the latter, we should certainly add it to the "supported components" page as an unsupported variant, but I wouldn't rush to implement it, just because.) |
I think it's a gap vs the spec as the prominent variant is visible and presented multiple times in them. Also I like this variant better for desktop screens, it gives more emphasis for the page title and action items. |
This comment has been minimized.
This comment has been minimized.
@mbrookes a use case I've encountered recently is having an app bar with quite long page title and icons/buttons on it, on a small mobile device (thinking about 320px wide). The material guidelines suggest to go for prominent app bar in such case. This is often language-specific as some language have quite long words (German or Spanish). Would it be something you could target soonish? Thanks! |
@wojtczal Would you like to work on it? The contributing guide will show you how to get started. It isn't as onerous as it looks. |
@mbrookes, I'd like to take a stab at this one.
To add the enhancement described in this issue, adding a prop like However, for extra pints I might try to match the spec. |
You sure you aren't British? 🍻 😆
For other components we have the |
Haha, yeah I meant extra points, but pints works better! 🍻 |
@mbrookes, before making any changes, I tried to achieve the prominent layout in a codesandbox, based on one of the demos. (my changes are marked by comments) I found that supporting the prominent bar variant would require changes in the Toolbar component, not the AppBar.
variant?: 'regular' | 'dense' I would suggest changing the API to dense?: boolean;
prominent?: boolean; This follows your suggestion and will allow users to combine the two props as they like.
I'd like to get feedback before making any changes. |
@burtyish Thanks for the CodeSandbox. That looks good. Between the breaking change, and the need to style the children, I wonder if for now a demo in the docs based on your example would be the better option? |
@mbrookes you got it. |
Hello,
it would be great to have the
prominent
variant for theAppBar
component. It's nice on desktop!Examples 🌈
You can find an example in the official Material Components Web library : https://material-components.github.io/material-components-web-catalog/#/component/top-app-bar/prominent
You can also look at the specs : https://material.io/design/components/app-bars-top.html#anatomy
The text was updated successfully, but these errors were encountered: