{/* to accomdate for top white space */}
+
+ {/* content */}
+
+
- )
-};
+ );
+}
```
-Or you can append `
` component after `
` like shown in the example
-below. To prevent content from hiding under Appbar.
+3. You can use `theme.mixins.toolbar` CSS:
```jsx
+const useStyles = makeStyles(theme => ({
+ offset: theme.mixins.toolbar,
+}))
+
function App() {
+ const classes = useStyles();
return (
- {/* AppBar content here */}
+ {/* content */}
-
+
- );
-}
+ )
+};
```
## Scrolling
diff --git a/packages/material-ui/src/AppBar/AppBar.js b/packages/material-ui/src/AppBar/AppBar.js
index 70e3bf4ef0d1c6..7fe2279ce63995 100644
--- a/packages/material-ui/src/AppBar/AppBar.js
+++ b/packages/material-ui/src/AppBar/AppBar.js
@@ -35,6 +35,7 @@ export const styles = theme => {
},
/* Styles applied to the root element if `position="sticky"`. */
positionSticky: {
+ // ⚠️ sticky is not supported by IE 11.
position: 'sticky',
top: 0,
left: 'auto',