<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/prepare-toolbar-items-for-a-vertical-bar-vwg80x4ia" -->

---
title: Prepare toolbar items for a vertical bar | daily.dev
description: Toolbar items can carry both an icon and a title, and on iPhone Duo the system uses that data to decide whether an item can move to a vertical bar. Symbol-only...
canonical: https://daily.dev/posts/prepare-toolbar-items-for-a-vertical-bar-vwg80x4ia
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Prepare toolbar items for a vertical bar | daily.dev
og:description: Toolbar items can carry both an icon and a title, and on iPhone Duo the system uses that data to decide whether an item can move to a vertical bar. Symbol-only...
og:url: https://daily.dev/posts/prepare-toolbar-items-for-a-vertical-bar-vwg80x4ia
og:image: https://api.daily.dev/og/posts/VWg80x4ia.png
og:image:alt: Prepare toolbar items for a vertical bar
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Prepare toolbar items for a vertical bar

**[Sarunw](https://daily.dev/sources/sarunw)** · [@sarunw](https://daily.dev/sarunw) · 4 min read · 0 upvotes · 0 comments

## Summary

Toolbar items can carry both an icon and a title, and on iPhone Duo the system uses that data to decide whether an item can move to a vertical bar. Symbol-only items like back and share can go vertical, while text-only items like Edit stay horizontal because vertical bars have a fixed width. Developers can override the default placement with the new axisBehavior API, using .horizontalOnly for buttons that swap between symbol and text, and .verticalPreferred for custom views built to adapt to a vertical layout.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://sarunw.com/posts/prepare-toolbar-items-for-a-vertical-bar>

## Questions this post answers

### How does the system decide whether a toolbar item appears in a vertical or horizontal bar on iPhone Duo?

Items that have an icon, such as back and share buttons, move to the vertical axis, while text-only items like Edit stay horizontal because a vertical bar has a fixed width and cannot grow to fit a text label. Providing both an icon and a title on every toolbar item, via a SwiftUI Label or UIBarButtonItem properties, lets the system make this choice correctly.

_Developers adapting toolbars for iPhone Duo can follow iOS platform updates like this on daily.dev._

### How do I stop a custom toolbar button from jumping between the vertical and horizontal bar when its label changes, like an Edit button that turns into Done?

Mark the button horizontal only using the axisBehavior API's .horizontalOnly setting. Buttons that swap between a symbol and text, such as Edit becoming Done, should stay on the horizontal axis at all times since text-only content cannot fit in a fixed-width vertical bar, and jumping axes as the label changes would look broken.

_Anyone building adaptive toolbars can track SwiftUI API additions like axisBehavior on daily.dev._

### How do I let a custom toolbar view appear in a vertical bar on iPhone Duo?

Apply .axisBehavior(.verticalPreferred) to the custom view. By default the system keeps custom and complex views horizontal because it cannot verify they will fit a fixed width, so this flag signals that the view has been designed to work vertically; further layout work beyond the flag is still needed for it to render correctly.

_Teams adopting iPhone Duo layouts can keep up with SwiftUI toolbar APIs via daily.dev._

## Similar posts on daily.dev

- [Toolbar overflow and visibility priority on iPhone Duo](https://daily.dev/posts/toolbar-overflow-and-visibility-priority-on-iphone-duo-xykkz59tb) · Sarunw · 2 upvotes · 0 comments
- [Taking Control of Toolbar Items in SwiftUI](https://daily.dev/posts/taking-control-of-toolbar-items-in-swiftui-0e6yeuoon) · Swift with Majid · 0 upvotes · 0 comments
- [When toolbar items share a glass background in iOS 26](https://daily.dev/posts/when-toolbar-items-share-a-glass-background-in-ios-26-7it8y3hpc) · Sarunw · 0 upvotes · 0 comments
- [Presenting SwiftUI sheets on iPhone Duo](https://daily.dev/posts/presenting-swiftui-sheets-on-iphone-duo-py7zqu9ke) · Nil Coalescing · 0 upvotes · 0 comments

---

Tags: [#ios](https://daily.dev/tags/ios), [#swiftui](https://daily.dev/tags/swiftui)

[View this post on daily.dev](https://daily.dev/posts/prepare-toolbar-items-for-a-vertical-bar-vwg80x4ia)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Prepare toolbar items for a vertical bar","url":"https://daily.dev/posts/prepare-toolbar-items-for-a-vertical-bar-vwg80x4ia","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/prepare-toolbar-items-for-a-vertical-bar-vwg80x4ia"},"datePublished":"2026-09-22T20:45:20.201Z","dateModified":"2026-09-23T17:00:14.839Z","description":"Toolbar items can carry both an icon and a title, and on iPhone Duo the system uses that data to decide whether an item can move to a vertical bar. Symbol-only...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/8b7fc0424f47ecc0e53350497f59459d?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/8b7fc0424f47ecc0e53350497f59459d?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Sarunw","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Person","name":"Sarun Wongpatcharapakorn","url":"https://daily.dev/sarunw","image":"https://avatars.githubusercontent.com/u/795368?v=4","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":20}},"commentCount":0,"discussionUrl":"https://daily.dev/posts/prepare-toolbar-items-for-a-vertical-bar-vwg80x4ia","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ios,swiftui","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Sarunw","item":"https://daily.dev/sources/sarunw"},{"@type":"ListItem","position":3,"name":"Prepare toolbar items for a vertical bar"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/prepare-toolbar-items-for-a-vertical-bar-vwg80x4ia#faq","mainEntity":[{"@type":"Question","name":"How does the system decide whether a toolbar item appears in a vertical or horizontal bar on iPhone Duo?","acceptedAnswer":{"@type":"Answer","text":"Items that have an icon, such as back and share buttons, move to the vertical axis, while text-only items like Edit stay horizontal because a vertical bar has a fixed width and cannot grow to fit a text label. Providing both an icon and a title on every toolbar item, via a SwiftUI Label or UIBarButtonItem properties, lets the system make this choice correctly. Developers adapting toolbars for iPhone Duo can follow iOS platform updates like this on daily.dev."}},{"@type":"Question","name":"How do I stop a custom toolbar button from jumping between the vertical and horizontal bar when its label changes, like an Edit button that turns into Done?","acceptedAnswer":{"@type":"Answer","text":"Mark the button horizontal only using the axisBehavior API's .horizontalOnly setting. Buttons that swap between a symbol and text, such as Edit becoming Done, should stay on the horizontal axis at all times since text-only content cannot fit in a fixed-width vertical bar, and jumping axes as the label changes would look broken. Anyone building adaptive toolbars can track SwiftUI API additions like axisBehavior on daily.dev."}},{"@type":"Question","name":"How do I let a custom toolbar view appear in a vertical bar on iPhone Duo?","acceptedAnswer":{"@type":"Answer","text":"Apply .axisBehavior(.verticalPreferred) to the custom view. By default the system keeps custom and complex views horizontal because it cannot verify they will fit a fixed width, so this flag signals that the view has been designed to work vertically; further layout work beyond the flag is still needed for it to render correctly. Teams adopting iPhone Duo layouts can keep up with SwiftUI toolbar APIs via daily.dev."}}]}
```

