How to put a large title in the top leading corner in SwiftUI

⋅ 4 min read ⋅ SwiftUI Toolbar iOS 17

Table of Contents

Large titles came in iOS 11. They look beautiful, but they take up a lot of space. The title sits on its own row, below the toolbar buttons.

A large title. It has its own row, below the Compose button.
A large title. It has its own row, below the Compose button.

In iOS 17, Apple added a way to move it up. toolbarTitleDisplayMode(.inlineLarge) keeps the title large, but puts it in the toolbar, on the same row as your buttons.

In this article, we will learn how its behavior differs between iOS versions and what happens to your leading buttons.

How to use .inlineLarge

You apply toolbarTitleDisplayMode(_:) to the screen inside a navigation stack, next to navigationTitle.

NavigationStack {
List {
// ...
}
.navigationTitle("Notes")
.toolbarTitleDisplayMode(.inlineLarge)
}

With .inlineLarge, the title is as big as a large title, but it sits in the toolbar instead of below it.

With .large, the title has its own row. With .inlineLarge, it moves up next to the Compose button.
With .large, the title has its own row. With .inlineLarge, it moves up next to the Compose button.

You can easily support sarunw.com by checking out this sponsor.

Sponsor sarunw.com and reach thousands of iOS developers.

.inlineLarge vs .large vs .inline

ToolbarTitleDisplayMode has four values.

  • .large: a large title on its own row, below the toolbar buttons.
  • .inline: a small title in the middle of the toolbar.
  • .inlineLarge: a large title in the toolbar, on the leading side.
  • .automatic: the system decides. Apple's documentation says the root screen of a navigation stack gets .large when it has a title.

In my testing, the .inlineLarge title is the same size as a .large title. Only its position changes, so you save the height of one row.

When you scroll, it acts like .large. The big title turns into a small title in the center of the bar.

After scrolling, .inlineLarge looks like a normal inline title.
After scrolling, .inlineLarge looks like a normal inline title.

If you want the small title to stay on the leading side, add toolbarTitleAlignment(.leading) (iOS 27.2). I covered it in How to move a navigation title to the leading edge in SwiftUI. It doesn't change the big title at the top, which is already on the leading side.

Where your toolbar items go

With .inlineLarge, the large title takes up the top leading corner. So what happens to the buttons that want to be there?

Leading items

Here is what Apple's documentation says about .inlineLarge:

In iOS, this behavior displays the title as large inside the toolbar and moves any leading or centered toolbar items into the overflow menu of the toolbar.

That's true on iOS 26. But the result is different on each major version of iOS.

List { ... }
.navigationTitle("Notes")
.toolbarTitleDisplayMode(.inlineLarge)
.toolbar {
ToolbarItem(placement: .topBarLeading) {
Button("Filter", systemImage: "line.3.horizontal.decrease") {}
}
ToolbarItem(placement: .topBarTrailing) {
Button("Compose", systemImage: "square.and.pencil") {}
}
}

Here is what happens to the Filter button.

  • iOS 17: it's hidden, and there is no ••• button. It comes back on the leading side when you scroll and the title gets small.
  • iOS 26: it goes into the ••• (overflow) menu, just like the documentation says.
  • iOS 27: there is no ••• menu. The button moves to the trailing side, right before the Compose button.
On iOS 17, Filter is hidden. On iOS 26, it is in the ••• menu. On iOS 27, it sits next to Compose.
On iOS 17, Filter is hidden. On iOS 26, it is in the ••• menu. On iOS 27, it sits next to Compose.

A .navigation item behaves the same as a .topBarLeading item on all three versions.

The trailing items don't move on any version. So if a button matters, put it in .topBarTrailing yourself. Then it's always visible, and it looks the same on every version.

Principal item

A .principal item, the "centered" item from Apple's quote, is even more different.

  • iOS 17: it stays in the center, next to the large title.
  • iOS 26: it's gone. It isn't in the ••• menu either.
  • iOS 27: it stays in the center, and .inlineLarge stops working. The title goes back to a normal large title below the bar, as if you used .large.
On iOS 17, the .principal item sits next to the large title. On iOS 26, it is gone. On iOS 27, the title drops below the bar.
On iOS 17, the .principal item sits next to the large title. On iOS 26, it is gone. On iOS 27, the title drops below the bar.

So I wouldn't use .inlineLarge together with a .principal item.

Things that affect the .inlineLarge title appearance

A few things stop the title from looking like the one in the first image.

Pushed screen

.inlineLarge doesn't do anything on a pushed screen. In my testing, a screen with a back button got a normal large title below the bar, even when that screen set .inlineLarge itself. The back button stayed where it was.

That was the same on iOS 17, 26, and 27.

Subtitle

If you use navigationSubtitle (iOS 26 or later), the title gets smaller so both lines fit in the toolbar. It's no longer large.

With a subtitle, the title shrinks to fit in the bar.
With a subtitle, the title shrinks to fit in the bar.

Long title

A long title doesn't fit next to the buttons, and each version handles it differently.

  • iOS 17 and 26: the title stays large and is cut off with "…".
  • iOS 27: the title gets smaller to fit. If it's still too long, it's cut off.
On iOS 17 and 26, the long title is cut off. On iOS 27, it gets smaller and fits.
On iOS 17 and 26, the long title is cut off. On iOS 27, it gets smaller and fits.

You can easily support sarunw.com by checking out this sponsor.

Sponsor sarunw.com and reach thousands of iOS developers.

Conclusion

.inlineLarge keeps the beautiful look of a large title while saving some space.

But as you learned, the result is different on each iOS version. In the worst case, a toolbar item disappears.

If you have important actions or information, make sure you use the right placement for your items.

If you want to see where each toolbar item goes, check out Toolbar item placements in SwiftUI.


Read more article about SwiftUI, Toolbar, iOS 17, or see all available topic

Enjoy the read?

If you enjoy this article, you can subscribe to the weekly newsletter.
Every Friday, you'll get a quick recap of all articles and tips posted on this site. No strings attached. Unsubscribe anytime.

Feel free to follow me on Twitter and ask your questions related to this post. Thanks for reading and see you next time.

I also make short videos and visual guides on Patreon. Some things are easier to see than to read, like how an API looks and moves on a real screen. If you like to learn that way, come and watch. Sharing the article is also greatly appreciated.

Become a patron Tweet Share
Previous
How to minimize the tab bar on scroll in SwiftUI

iOS 26 adds tabBarMinimizeBehavior(_:). Learn what each option does on iPhone, how to show the full tab bar again, and which tabs stay when it shrinks.

← Home