Material-UI's AppBar provides a title property but no subtitle property. I want to add something in smaller text below the title, but I haven't been able to figure out a way to do it. Adding a
tag hides anything past that, and changing the display property of anything in that area to block also hides it. The only solution I've been able to find involves pretty severely mangling the component (basically ignoring the title property and hijacking the AppBar with a width 100% div, which isn't ideal). Has anyone found a better way to do this? Thanks!
Is it possible to add a subtitle in material-ui Appbars?
3.6k views Asked by dlwiest At
2
You can put any HTML/components you want in the
title
prop.titleStyle
can be used to tweak the outermost element (I use it below to override the "line-height: 64px" thatAppBar
adds to the outermost<div>
by default):https://jsfiddle.net/tktbsv63/1/