18 June 2022

Most sites or apps show a logo on the left corner of the screen. In Material ui there is AppBar component. The official examples don't have this snippet. Link to the official documentation: https://mui.com/material-ui/react-app-bar/

Source code viewer
  1. import Box from '@mui/material/Box';
  2. import Link from '@mui/material/Link';
  3. import Toolbar from '@mui/material/Toolbar';
  4. import AppBar from '@mui/material/AppBar';
  5. import logo from '/assets/logo.png';
  6.  
  7. <AppBar position="static">
  8. <Toolbar>
  9. <Link href="/">
  10. <Box
  11. component="img"
  12. sx={{ height: 54 }}
  13. alt="Logo"
  14. src={logo}
  15. />
  16. </Link>
  17. // ...
Programming Language: ECMAScript