Sub-title in Navbar

Does Ionic 2 support sub-titles in the Navbar? Or do I have to implement it myself via css?

ion-navbar seems to support only one title, but I need an additional sub-title directly below the title (and with smaller font).

Solved it with custom css:

.toolbar-title {
  overflow: visible;
  position: relative;
  .subtitle {
    position: absolute;
    top: 8px;
    font-size: 66%;
  }
}

And in template:

<ion-title>
  Main Title  
  <p class="subtitle">Sub-Title</p>
</ion-title>
4 Likes

I’ve been trying your code but was unsuccessful, here is what I did:

  .toolbar-title {
    .subtitle {
      font-size: 66%;
      margin: 0;
    }
  }

The template can be the same :slight_smile:

Thanks!

2 Likes