-
-
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] Sticky #6722
Comments
This is not a feature, its rather a css thing. This creates exactly the same behavior as proposed by setting the AppBar style to position: fixed. import React, { Component } from "react";
import MuiThemeProvider from "material-ui/styles/MuiThemeProvider";
import AppBar from "material-ui/AppBar";
class App extends Component {
render() {
return (
<MuiThemeProvider>
<div>
<AppBar style={{ position: "fixed" }} />
<div style={{ paddingTop: 64 }}>content</div>
</div>
</MuiThemeProvider>
);
}
}
export default App; |
I'm sure it is a css thing. But that does not mean it shouldn't be a feature. I just created an entire web app using material-ui and it looks amazing. And I barely used any css. That's because material-ui does all of the css for me. One of the defining things about web ui components (in my mind) is the encapsulation of the CSS. So the fact that something is a "css thing" doesn't mean it shouldn't be a feature of material-ui. Secondly, I don't think it's as simple adding position: "fixed". See this discussion for details: |
This is the AppBar's behavior in the next branch. |
We now have 3 positioning strategies with the next branch, thanks to #7049:
|
So there is no way to do it yet??? |
@BravenxX Sticky was added 3 years ago: #10090. |
It would be cool if version 1 supports sticky app bar, like this one:
https://www.muicss.com/docs/v1/example-layouts/blog
The text was updated successfully, but these errors were encountered: