---
productId: material-ui
title: App Bar React component
components: AppBar, Toolbar, Menu
githubLabel: 'scope: app bar'
materialDesign: https://m2.material.io/components/app-bars-top
githubSource: packages/mui-material/src/AppBar
---
# App Bar
The App Bar displays information and actions relating to the current screen.
The top App bar provides content and actions related to the current screen. It's used for branding, screen titles, navigation, and actions.
It can transform into a contextual action bar or be used as a navbar.
## Basic App bar
```tsx
import AppBar from '@mui/material/AppBar';
import Box from '@mui/material/Box';
import Toolbar from '@mui/material/Toolbar';
import Typography from '@mui/material/Typography';
import Button from '@mui/material/Button';
import IconButton from '@mui/material/IconButton';
import MenuIcon from '@mui/icons-material/Menu';
export default function ButtonAppBar() {
return (
News
);
}
```
## App bar with menu
```tsx
import * as React from 'react';
import AppBar from '@mui/material/AppBar';
import Box from '@mui/material/Box';
import Toolbar from '@mui/material/Toolbar';
import Typography from '@mui/material/Typography';
import IconButton from '@mui/material/IconButton';
import MenuIcon from '@mui/icons-material/Menu';
import AccountCircle from '@mui/icons-material/AccountCircle';
import Switch from '@mui/material/Switch';
import FormControlLabel from '@mui/material/FormControlLabel';
import FormGroup from '@mui/material/FormGroup';
import MenuItem from '@mui/material/MenuItem';
import Menu from '@mui/material/Menu';
export default function MenuAppBar() {
const [auth, setAuth] = React.useState(true);
const [anchorEl, setAnchorEl] = React.useState(null);
const handleChange = (event: React.ChangeEvent) => {
setAuth(event.target.checked);
};
const handleMenu = (event: React.MouseEvent) => {
setAnchorEl(event.currentTarget);
};
const handleClose = () => {
setAnchorEl(null);
};
return (
}
label={auth ? 'Logout' : 'Login'}
/>
Photos
{auth && (
)}
);
}
```
## App bar with responsive menu
```tsx
import * as React from 'react';
import AppBar from '@mui/material/AppBar';
import Box from '@mui/material/Box';
import Toolbar from '@mui/material/Toolbar';
import IconButton from '@mui/material/IconButton';
import Typography from '@mui/material/Typography';
import Menu from '@mui/material/Menu';
import MenuIcon from '@mui/icons-material/Menu';
import Container from '@mui/material/Container';
import Avatar from '@mui/material/Avatar';
import Button from '@mui/material/Button';
import Tooltip from '@mui/material/Tooltip';
import MenuItem from '@mui/material/MenuItem';
import AdbIcon from '@mui/icons-material/Adb';
const pages = ['Products', 'Pricing', 'Blog'];
const settings = ['Profile', 'Account', 'Dashboard', 'Logout'];
function ResponsiveAppBar() {
const [anchorElNav, setAnchorElNav] = React.useState(null);
const [anchorElUser, setAnchorElUser] = React.useState(null);
const handleOpenNavMenu = (event: React.MouseEvent) => {
setAnchorElNav(event.currentTarget);
};
const handleOpenUserMenu = (event: React.MouseEvent) => {
setAnchorElUser(event.currentTarget);
};
const handleCloseNavMenu = () => {
setAnchorElNav(null);
};
const handleCloseUserMenu = () => {
setAnchorElUser(null);
};
return (
LOGO
LOGO
{pages.map((page) => (
))}
);
}
export default ResponsiveAppBar;
```
## App bar with search field
A side searchbar.
```tsx
import { styled, alpha } from '@mui/material/styles';
import AppBar from '@mui/material/AppBar';
import Box from '@mui/material/Box';
import Toolbar from '@mui/material/Toolbar';
import IconButton from '@mui/material/IconButton';
import Typography from '@mui/material/Typography';
import InputBase from '@mui/material/InputBase';
import MenuIcon from '@mui/icons-material/Menu';
import SearchIcon from '@mui/icons-material/Search';
const Search = styled('div')(({ theme }) => ({
position: 'relative',
borderRadius: theme.shape.borderRadius,
backgroundColor: alpha(theme.palette.common.white, 0.15),
'&:hover': {
backgroundColor: alpha(theme.palette.common.white, 0.25),
},
marginLeft: 0,
width: '100%',
[theme.breakpoints.up('sm')]: {
marginLeft: theme.spacing(1),
width: 'auto',
},
}));
const SearchIconWrapper = styled('div')(({ theme }) => ({
padding: theme.spacing(0, 2),
height: '100%',
position: 'absolute',
pointerEvents: 'none',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}));
const StyledInputBase = styled(InputBase)(({ theme }) => ({
color: 'inherit',
width: '100%',
'& .MuiInputBase-input': {
padding: theme.spacing(1, 1, 1, 0),
// vertical padding + font size from searchIcon
paddingLeft: `calc(1em + ${theme.spacing(4)})`,
transition: theme.transitions.create('width'),
[theme.breakpoints.up('sm')]: {
width: '12ch',
'&:focus': {
width: '20ch',
},
},
},
}));
export default function SearchAppBar() {
return (
MUI
);
}
```
## Responsive App bar with Drawer
```tsx
import * as React from 'react';
import AppBar from '@mui/material/AppBar';
import Box from '@mui/material/Box';
import CssBaseline from '@mui/material/CssBaseline';
import Divider from '@mui/material/Divider';
import Drawer from '@mui/material/Drawer';
import IconButton from '@mui/material/IconButton';
import List from '@mui/material/List';
import ListItem from '@mui/material/ListItem';
import ListItemButton from '@mui/material/ListItemButton';
import ListItemText from '@mui/material/ListItemText';
import MenuIcon from '@mui/icons-material/Menu';
import Toolbar from '@mui/material/Toolbar';
import Typography from '@mui/material/Typography';
import Button from '@mui/material/Button';
interface Props {
/**
* Injected by the documentation to work in an iframe.
* You won't need it on your project.
*/
window?: () => Window;
}
const drawerWidth = 240;
const navItems = ['Home', 'About', 'Contact'];
export default function DrawerAppBar(props: Props) {
const { window } = props;
const [mobileOpen, setMobileOpen] = React.useState(false);
const handleDrawerToggle = () => {
setMobileOpen((prevState) => !prevState);
};
const drawer = (
MUI
{navItems.map((item) => (
))}
);
const container = window !== undefined ? () => window().document.body : undefined;
return (
MUI
{navItems.map((item) => (
))}
Lorem ipsum dolor sit amet consectetur adipisicing elit. Similique unde
fugit veniam eius, perspiciatis sunt? Corporis qui ducimus quibusdam,
aliquam dolore excepturi quae. Distinctio enim at eligendi perferendis in
cum quibusdam sed quae, accusantium et aperiam? Quod itaque exercitationem,
at ab sequi qui modi delectus quia corrupti alias distinctio nostrum.
Minima ex dolor modi inventore sapiente necessitatibus aliquam fuga et. Sed
numquam quibusdam at officia sapiente porro maxime corrupti perspiciatis
asperiores, exercitationem eius nostrum consequuntur iure aliquam itaque,
assumenda et! Quibusdam temporibus beatae doloremque voluptatum doloribus
soluta accusamus porro reprehenderit eos inventore facere, fugit, molestiae
ab officiis illo voluptates recusandae. Vel dolor nobis eius, ratione atque
soluta, aliquam fugit qui iste architecto perspiciatis. Nobis, voluptatem!
Cumque, eligendi unde aliquid minus quis sit debitis obcaecati error,
delectus quo eius exercitationem tempore. Delectus sapiente, provident
corporis dolorum quibusdam aut beatae repellendus est labore quisquam
praesentium repudiandae non vel laboriosam quo ab perferendis velit ipsa
deleniti modi! Ipsam, illo quod. Nesciunt commodi nihil corrupti cum non
fugiat praesentium doloremque architecto laborum aliquid. Quae, maxime
recusandae? Eveniet dolore molestiae dicta blanditiis est expedita eius
debitis cupiditate porro sed aspernatur quidem, repellat nihil quasi
praesentium quia eos, quibusdam provident. Incidunt tempore vel placeat
voluptate iure labore, repellendus beatae quia unde est aliquid dolor
molestias libero. Reiciendis similique exercitationem consequatur, nobis
placeat illo laudantium! Enim perferendis nulla soluta magni error,
provident repellat similique cupiditate ipsam, et tempore cumque quod! Qui,
iure suscipit tempora unde rerum autem saepe nisi vel cupiditate iusto.
Illum, corrupti? Fugiat quidem accusantium nulla. Aliquid inventore commodi
reprehenderit rerum reiciendis! Quidem alias repudiandae eaque eveniet
cumque nihil aliquam in expedita, impedit quas ipsum nesciunt ipsa ullam
consequuntur dignissimos numquam at nisi porro a, quaerat rem repellendus.
Voluptates perspiciatis, in pariatur impedit, nam facilis libero dolorem
dolores sunt inventore perferendis, aut sapiente modi nesciunt.
);
}
```
## App bar with a primary search field
A primary searchbar.
```tsx
import * as React from 'react';
import { styled, alpha } from '@mui/material/styles';
import AppBar from '@mui/material/AppBar';
import Box from '@mui/material/Box';
import Toolbar from '@mui/material/Toolbar';
import IconButton from '@mui/material/IconButton';
import Typography from '@mui/material/Typography';
import InputBase from '@mui/material/InputBase';
import Badge from '@mui/material/Badge';
import MenuItem from '@mui/material/MenuItem';
import Menu from '@mui/material/Menu';
import MenuIcon from '@mui/icons-material/Menu';
import SearchIcon from '@mui/icons-material/Search';
import AccountCircle from '@mui/icons-material/AccountCircle';
import MailIcon from '@mui/icons-material/Mail';
import NotificationsIcon from '@mui/icons-material/Notifications';
import MoreIcon from '@mui/icons-material/MoreVert';
const Search = styled('div')(({ theme }) => ({
position: 'relative',
borderRadius: theme.shape.borderRadius,
backgroundColor: alpha(theme.palette.common.white, 0.15),
'&:hover': {
backgroundColor: alpha(theme.palette.common.white, 0.25),
},
marginRight: theme.spacing(2),
marginLeft: 0,
width: '100%',
[theme.breakpoints.up('sm')]: {
marginLeft: theme.spacing(3),
width: 'auto',
},
}));
const SearchIconWrapper = styled('div')(({ theme }) => ({
padding: theme.spacing(0, 2),
height: '100%',
position: 'absolute',
pointerEvents: 'none',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}));
const StyledInputBase = styled(InputBase)(({ theme }) => ({
color: 'inherit',
'& .MuiInputBase-input': {
padding: theme.spacing(1, 1, 1, 0),
// vertical padding + font size from searchIcon
paddingLeft: `calc(1em + ${theme.spacing(4)})`,
transition: theme.transitions.create('width'),
width: '100%',
[theme.breakpoints.up('md')]: {
width: '20ch',
},
},
}));
export default function PrimarySearchAppBar() {
const [anchorEl, setAnchorEl] = React.useState(null);
const [mobileMoreAnchorEl, setMobileMoreAnchorEl] =
React.useState(null);
const isMenuOpen = Boolean(anchorEl);
const isMobileMenuOpen = Boolean(mobileMoreAnchorEl);
const handleProfileMenuOpen = (event: React.MouseEvent) => {
setAnchorEl(event.currentTarget);
};
const handleMobileMenuClose = () => {
setMobileMoreAnchorEl(null);
};
const handleMenuClose = () => {
setAnchorEl(null);
handleMobileMenuClose();
};
const handleMobileMenuOpen = (event: React.MouseEvent) => {
setMobileMoreAnchorEl(event.currentTarget);
};
const menuId = 'primary-search-account-menu';
const renderMenu = (
);
const mobileMenuId = 'primary-search-account-menu-mobile';
const renderMobileMenu = (
);
return (
MUI
{renderMobileMenu}
{renderMenu}
);
}
```
## Dense (desktop only)
```tsx
import AppBar from '@mui/material/AppBar';
import Box from '@mui/material/Box';
import Toolbar from '@mui/material/Toolbar';
import Typography from '@mui/material/Typography';
import IconButton from '@mui/material/IconButton';
import MenuIcon from '@mui/icons-material/Menu';
export default function DenseAppBar() {
return (
Photos
);
}
```
## Prominent
A prominent app bar.
```tsx
import { styled } from '@mui/material/styles';
import AppBar from '@mui/material/AppBar';
import Box from '@mui/material/Box';
import Toolbar from '@mui/material/Toolbar';
import IconButton from '@mui/material/IconButton';
import Typography from '@mui/material/Typography';
import MenuIcon from '@mui/icons-material/Menu';
import SearchIcon from '@mui/icons-material/Search';
import MoreIcon from '@mui/icons-material/MoreVert';
const StyledToolbar = styled(Toolbar)(({ theme }) => ({
alignItems: 'flex-start',
paddingTop: theme.spacing(1),
paddingBottom: theme.spacing(2),
// Override media queries injected by theme.mixins.toolbar
'@media all': {
minHeight: 128,
},
}));
export default function ProminentAppBar() {
return (
MUI
);
}
```
## Bottom App bar
```tsx
import * as React from 'react';
import { styled } from '@mui/material/styles';
import AppBar from '@mui/material/AppBar';
import Box from '@mui/material/Box';
import CssBaseline from '@mui/material/CssBaseline';
import Toolbar from '@mui/material/Toolbar';
import Typography from '@mui/material/Typography';
import IconButton from '@mui/material/IconButton';
import Paper from '@mui/material/Paper';
import Fab from '@mui/material/Fab';
import List from '@mui/material/List';
import ListItemButton from '@mui/material/ListItemButton';
import ListItemAvatar from '@mui/material/ListItemAvatar';
import ListItemText from '@mui/material/ListItemText';
import ListSubheader from '@mui/material/ListSubheader';
import Avatar from '@mui/material/Avatar';
import MenuIcon from '@mui/icons-material/Menu';
import AddIcon from '@mui/icons-material/Add';
import SearchIcon from '@mui/icons-material/Search';
import MoreIcon from '@mui/icons-material/MoreVert';
const messages = [
{
id: 1,
primary: 'Brunch this week?',
secondary: "I'll be in the neighbourhood this week. Let's grab a bite to eat",
person: '/static/images/avatar/5.jpg',
},
{
id: 2,
primary: 'Birthday Gift',
secondary: `Do you have a suggestion for a good present for John on his work
anniversary. I am really confused & would love your thoughts on it.`,
person: '/static/images/avatar/1.jpg',
},
{
id: 3,
primary: 'Recipe to try',
secondary: 'I am try out this new BBQ recipe, I think this might be amazing',
person: '/static/images/avatar/2.jpg',
},
{
id: 4,
primary: 'Yes!',
secondary: 'I have the tickets to the ReactConf for this year.',
person: '/static/images/avatar/3.jpg',
},
{
id: 5,
primary: "Doctor's Appointment",
secondary: 'My appointment for the doctor was rescheduled for next Saturday.',
person: '/static/images/avatar/4.jpg',
},
{
id: 6,
primary: 'Discussion',
secondary: `Menus that are generated by the bottom app bar (such as a bottom
navigation drawer or overflow menu) open as bottom sheets at a higher elevation
than the bar.`,
person: '/static/images/avatar/5.jpg',
},
{
id: 7,
primary: 'Summer BBQ',
secondary: `Who wants to have a cookout this weekend? I just got some furniture
for my backyard and would love to fire up the grill.`,
person: '/static/images/avatar/1.jpg',
},
];
const StyledFab = styled(Fab)({
position: 'absolute',
zIndex: 1,
top: -30,
left: 0,
right: 0,
margin: '0 auto',
});
export default function BottomAppBar() {
return (
Inbox
{messages.map(({ id, primary, secondary, person }) => (
{id === 1 && (
Today
)}
{id === 3 && (
Yesterday
)}
))}
);
}
```
## Fixed placement
When you render the app bar position fixed, the dimension of the element doesn't impact the rest of the page. This can cause some part of your content to be invisible, behind the app bar. Here are 3 possible solutions:
1. You can use `position="sticky"` instead of fixed.
2. You can render a second `` component:
```jsx
function App() {
return (
{/* content */}
);
}
```
3. You can use `theme.mixins.toolbar` CSS:
```jsx
const Offset = styled('div')(({ theme }) => theme.mixins.toolbar);
function App() {
return (
{/* content */}
);
}
```
## Scrolling
You can use the `useScrollTrigger()` hook to respond to user scroll actions.
### Hide App bar
The app bar hides on scroll down to leave more space for reading.
```tsx
import * as React from 'react';
import AppBar from '@mui/material/AppBar';
import Toolbar from '@mui/material/Toolbar';
import Typography from '@mui/material/Typography';
import CssBaseline from '@mui/material/CssBaseline';
import useScrollTrigger from '@mui/material/useScrollTrigger';
import Box from '@mui/material/Box';
import Container from '@mui/material/Container';
import Slide from '@mui/material/Slide';
interface Props {
/**
* Injected by the documentation to work in an iframe.
* You won't need it on your project.
*/
window?: () => Window;
children?: React.ReactElement;
}
function HideOnScroll(props: Props) {
const { children, window } = props;
// Note that you normally won't need to set the window ref as useScrollTrigger
// will default to window.
// This is only being set here because the demo is in an iframe.
const trigger = useScrollTrigger({
target: window ? window() : undefined,
});
return (
{children ?? }
);
}
export default function HideAppBar(props: Props) {
return (
Scroll to hide App bar
{[...new Array(12)]
.map(
() => `Cras mattis consectetur purus sit amet fermentum.
Cras justo odio, dapibus ac facilisis in, egestas eget quam.
Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
Praesent commodo cursus magna, vel scelerisque nisl consectetur et.`,
)
.join('\n')}
);
}
```
### Elevate App bar
The app bar elevates on scroll to communicate that the user is not at the top of the page.
```tsx
import * as React from 'react';
import AppBar from '@mui/material/AppBar';
import Toolbar from '@mui/material/Toolbar';
import Typography from '@mui/material/Typography';
import CssBaseline from '@mui/material/CssBaseline';
import useScrollTrigger from '@mui/material/useScrollTrigger';
import Box from '@mui/material/Box';
import Container from '@mui/material/Container';
interface Props {
/**
* Injected by the documentation to work in an iframe.
* You won't need it on your project.
*/
window?: () => Window;
children?: React.ReactElement<{ elevation?: number }>;
}
function ElevationScroll(props: Props) {
const { children, window } = props;
// Note that you normally won't need to set the window ref as useScrollTrigger
// will default to window.
// This is only being set here because the demo is in an iframe.
const trigger = useScrollTrigger({
disableHysteresis: true,
threshold: 0,
target: window ? window() : undefined,
});
return children
? React.cloneElement(children, {
elevation: trigger ? 4 : 0,
})
: null;
}
export default function ElevateAppBar(props: Props) {
return (
Scroll to elevate App bar
{[...new Array(12)]
.map(
() => `Cras mattis consectetur purus sit amet fermentum.
Cras justo odio, dapibus ac facilisis in, egestas eget quam.
Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
Praesent commodo cursus magna, vel scelerisque nisl consectetur et.`,
)
.join('\n')}
);
}
```
### Back to top
A floating action button appears on scroll to make it easy to get back to the top of the page.
```tsx
import * as React from 'react';
import AppBar from '@mui/material/AppBar';
import Toolbar from '@mui/material/Toolbar';
import Typography from '@mui/material/Typography';
import CssBaseline from '@mui/material/CssBaseline';
import useScrollTrigger from '@mui/material/useScrollTrigger';
import Box from '@mui/material/Box';
import Container from '@mui/material/Container';
import Fab from '@mui/material/Fab';
import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp';
import Fade from '@mui/material/Fade';
interface Props {
/**
* Injected by the documentation to work in an iframe.
* You won't need it on your project.
*/
window?: () => Window;
children?: React.ReactElement;
}
function ScrollTop(props: Props) {
const { children, window } = props;
// Note that you normally won't need to set the window ref as useScrollTrigger
// will default to window.
// This is only being set here because the demo is in an iframe.
const trigger = useScrollTrigger({
target: window ? window() : undefined,
disableHysteresis: true,
threshold: 100,
});
const handleClick = (event: React.MouseEvent) => {
const anchor = (
(event.target as HTMLDivElement).ownerDocument || document
).querySelector('#back-to-top-anchor');
if (anchor) {
anchor.scrollIntoView({
block: 'center',
});
}
};
return (
{children}
);
}
export default function BackToTop(props: Props) {
return (
Scroll to see button
{[...new Array(12)]
.map(
() => `Cras mattis consectetur purus sit amet fermentum.
Cras justo odio, dapibus ac facilisis in, egestas eget quam.
Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
Praesent commodo cursus magna, vel scelerisque nisl consectetur et.`,
)
.join('\n')}
);
}
```
### `useScrollTrigger([options]) => trigger`
#### Arguments
1. `options` (_object_ [optional]):
- `options.disableHysteresis` (_bool_ [optional]): Defaults to `false`. Disable the hysteresis. Ignore the scroll direction when determining the `trigger` value.
- `options.target` (_Node_ [optional]): Defaults to `window`.
- `options.threshold` (_number_ [optional]): Defaults to `100`. Change the `trigger` value when the vertical scroll strictly crosses this threshold (exclusive).
#### Returns
`trigger`: Does the scroll position match the criteria?
#### Examples
```jsx
import useScrollTrigger from '@mui/material/useScrollTrigger';
function HideOnScroll(props) {
const trigger = useScrollTrigger();
return (
Hello
);
}
```
## Enable color on dark
Following the [Material Design guidelines](https://m2.material.io/design/color/dark-theme.html), the `color` prop has no effect on the appearance of the app bar in dark mode.
You can override this behavior by setting the `enableColorOnDark` prop to `true`.
```tsx
import AppBar from '@mui/material/AppBar';
import Stack from '@mui/material/Stack';
import Toolbar from '@mui/material/Toolbar';
import Typography from '@mui/material/Typography';
import IconButton from '@mui/material/IconButton';
import MenuIcon from '@mui/icons-material/Menu';
import { ThemeProvider, createTheme } from '@mui/material/styles';
function appBarLabel(label: string) {
return (
{label}
);
}
const darkTheme = createTheme({
palette: {
mode: 'dark',
primary: {
main: '#1976d2',
},
},
});
export default function EnableColorOnDarkAppBar() {
return (
{appBarLabel('enableColorOnDark')}
{appBarLabel('default')}
);
}
```
# AppBar API
## Demos
For examples and details on the usage of this React component, visit the component demo pages:
- [App Bar](https://mui.com/material-ui/react-app-bar/)
## Import
```jsx
import AppBar from '@mui/material/AppBar';
// or
import { AppBar } from '@mui/material';
```
## Props
| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| children | `node` | - | No | |
| classes | `object` | - | No | Override or extend the styles applied to the component. |
| color | `'default' \| 'inherit' \| 'primary' \| 'secondary' \| 'transparent' \| 'error' \| 'info' \| 'success' \| 'warning' \| string` | `'primary'` | No | |
| elevation | `number` | `4` | No | |
| enableColorOnDark | `bool` | `false` | No | |
| position | `'absolute' \| 'fixed' \| 'relative' \| 'static' \| 'sticky'` | `'fixed'` | No | |
| square | `bool` | `true` | No | |
| sx | `Array \| func \| object` | - | No | The system prop that allows defining system overrides as well as additional CSS styles. |
> **Note**: The `ref` is forwarded to the root element (HTMLElement).
> Any other props supplied will be provided to the root element ([Paper](https://mui.com/material-ui/api/paper/)).
## Inheritance
While not explicitly documented above, the props of the [Paper](https://mui.com/material-ui/api/paper/) component are also available on AppBar.
## Theme default props
You can use `MuiAppBar` to change the default props of this component with the theme.
## CSS
### Rule name
| Global class | Rule name | Description |
|--------------|-----------|-------------|
| - | colorDefault | Styles applied to the root element if `color="default"`. |
| - | colorError | Styles applied to the root element if `color="error"`. |
| - | colorInfo | Styles applied to the root element if `color="info"`. |
| - | colorInherit | Styles applied to the root element if `color="inherit"`. |
| - | colorPrimary | Styles applied to the root element if `color="primary"`. |
| - | colorSecondary | Styles applied to the root element if `color="secondary"`. |
| - | colorSuccess | Styles applied to the root element if `color="success"`. |
| - | colorTransparent | Styles applied to the root element if `color="transparent"`. |
| - | colorWarning | Styles applied to the root element if `color="warning"`. |
| - | positionAbsolute | Styles applied to the root element if `position="absolute"`. |
| - | positionFixed | Styles applied to the root element if `position="fixed"`. |
| - | positionRelative | Styles applied to the root element if `position="relative"`. |
| - | positionStatic | Styles applied to the root element if `position="static"`. |
| - | positionSticky | Styles applied to the root element if `position="sticky"`. |
| - | root | Styles applied to the root element. |
## Source code
If you did not find the information on this page, consider having a look at the implementation of the component for more detail.
- [/packages/mui-material/src/AppBar/AppBar.js](https://github.com/mui/material-ui/tree/HEAD/packages/mui-material/src/AppBar/AppBar.js)
# Menu API
## Demos
For examples and details on the usage of this React component, visit the component demo pages:
- [App Bar](https://mui.com/material-ui/react-app-bar/)
- [Menu](https://mui.com/material-ui/react-menu/)
## Import
```jsx
import Menu from '@mui/material/Menu';
// or
import { Menu } from '@mui/material';
```
## Props
| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| open | `bool` | - | Yes | |
| anchorEl | `HTML element \| func` | - | No | |
| autoFocus | `bool` | `true` | No | |
| children | `node` | - | No | |
| classes | `object` | - | No | Override or extend the styles applied to the component. |
| disableAutoFocusItem | `bool` | `false` | No | |
| onClose | `function(event: object, reason: string) => void` | - | No | |
| PopoverClasses | `object` | - | No | |
| slotProps | `{ backdrop?: func \| object, list?: func \| object, paper?: func \| object, root?: func \| object, transition?: func \| object }` | `{}` | No | |
| slots | `{ backdrop?: elementType, list?: elementType, paper?: elementType, root?: elementType, transition?: elementType }` | `{}` | No | |
| sx | `Array \| func \| object` | - | No | The system prop that allows defining system overrides as well as additional CSS styles. |
| transitionDuration | `'auto' \| number \| { appear?: number, enter?: number, exit?: number }` | `'auto'` | No | |
| variant | `'menu' \| 'selectedMenu'` | `'selectedMenu'` | No | |
> **Note**: The `ref` is forwarded to the root element (HTMLDivElement).
> Any other props supplied will be provided to the root element ([Popover](https://mui.com/material-ui/api/popover/)).
## Inheritance
While not explicitly documented above, the props of the [Popover](https://mui.com/material-ui/api/popover/) component are also available on Menu.
## Slots
| Name | Default | Class | Description |
|------|---------|-------|-------------|
| root | `Modal` | `.MuiMenu-root` | The component used for the popper. |
| paper | `PopoverPaper` | `.MuiMenu-paper` | The component used for the paper. |
| list | `MenuList` | `.MuiMenu-list` | The component used for the list. |
| transition | `Grow` | - | The component used for the transition slot. |
| backdrop | `Backdrop` | - | The component used for the backdrop slot. |
## Source code
If you did not find the information on this page, consider having a look at the implementation of the component for more detail.
- [/packages/mui-material/src/Menu/Menu.js](https://github.com/mui/material-ui/tree/HEAD/packages/mui-material/src/Menu/Menu.js)
# Toolbar API
## Demos
For examples and details on the usage of this React component, visit the component demo pages:
- [App Bar](https://mui.com/material-ui/react-app-bar/)
## Import
```jsx
import Toolbar from '@mui/material/Toolbar';
// or
import { Toolbar } from '@mui/material';
```
## Props
| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
| children | `node` | - | No | |
| classes | `object` | - | No | Override or extend the styles applied to the component. |
| component | `elementType` | - | No | |
| disableGutters | `bool` | `false` | No | |
| sx | `Array \| func \| object` | - | No | The system prop that allows defining system overrides as well as additional CSS styles. |
| variant | `'dense' \| 'regular' \| string` | `'regular'` | No | |
> **Note**: The `ref` is forwarded to the root element (HTMLDivElement).
> Any other props supplied will be provided to the root element (native element).
## Theme default props
You can use `MuiToolbar` to change the default props of this component with the theme.
## CSS
### Rule name
| Global class | Rule name | Description |
|--------------|-----------|-------------|
| - | dense | Styles applied to the root element if `variant="dense"`. |
| - | gutters | Styles applied to the root element unless `disableGutters={true}`. |
| - | regular | Styles applied to the root element if `variant="regular"`. |
| - | root | Styles applied to the root element. |
## Source code
If you did not find the information on this page, consider having a look at the implementation of the component for more detail.
- [/packages/mui-material/src/Toolbar/Toolbar.js](https://github.com/mui/material-ui/tree/HEAD/packages/mui-material/src/Toolbar/Toolbar.js)