dommer dommer - 1 year ago 98
React JSX Question

How do I display an image on left of Material-UI AppBar, but retain the "hamburger" menu?

I'd like to display an image on the left of a Material-UI AppBar, but keep the "hamburger" menu and have the image just to the right of that.

Is it possible? I can add an image to the left using

<AppBar title="My App"
iconElementLeft = {<img src='header-logo.png' alt="Logo" />} />;

However, that replaces the "hamburger" menu, which is no use to me.

I also tried creating an
as a child of the
, but that puts the image to the right of any

Answer Source

Just pass your tag as the title. Material-ui will take a node as title

Something like

    title={<img src=""/>}

Working pen

Hope this helps!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download