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

[AppBar] Sticky #6722

Closed
StokeMasterJack opened this issue Apr 27, 2017 · 6 comments
Closed

[AppBar] Sticky #6722

StokeMasterJack opened this issue Apr 27, 2017 · 6 comments
Labels
component: app bar This is the name of the generic UI component, not the React module!

Comments

@StokeMasterJack
Copy link

It would be cool if version 1 supports sticky app bar, like this one:

https://www.muicss.com/docs/v1/example-layouts/blog

@philipodev
Copy link

philipodev commented Apr 27, 2017

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;

@StokeMasterJack
Copy link
Author

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:

#1792 (comment)

@kgregory
Copy link
Member

kgregory commented May 3, 2017

This is the AppBar's behavior in the next branch.

@oliviertassinari oliviertassinari changed the title Sticky App Bar [AppBar] Sticky May 21, 2017
@oliviertassinari oliviertassinari added the component: app bar This is the name of the generic UI component, not the React module! label May 21, 2017
@oliviertassinari
Copy link
Member

We now have 3 positioning strategies with the next branch, thanks to #7049:

  • fixed (default)
  • static
  • absolute

@ghost
Copy link

ghost commented Sep 16, 2020

So there is no way to do it yet???

@oliviertassinari
Copy link
Member

@BravenxX Sticky was added 3 years ago: #10090.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: app bar This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

4 participants