feat(toolbar): add titlePlacement prop to control title position relative to content#31034
Draft
brandyscarney wants to merge 6 commits intonextfrom
Draft
feat(toolbar): add titlePlacement prop to control title position relative to content#31034brandyscarney wants to merge 6 commits intonextfrom
brandyscarney wants to merge 6 commits intonextfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
brandyscarney
commented
Mar 24, 2026
| return this.titlePlacement; | ||
| } | ||
|
|
||
| return getIonTheme(this) === 'ionic' || getIonTheme(this) === 'ios' ? 'center' : 'start'; |
Member
Author
There was a problem hiding this comment.
While this property doesn't work with ios or md yet, this will be needed eventually when we update them to work with it.
brandyscarney
commented
Mar 24, 2026
| * `"center"`: The title will appear in the center of the toolbar. | ||
| * `"end"`: The title will appear to the right of the toolbar content in LTR and to the left in RTL. | ||
| */ | ||
| @Prop() titlePlacement?: 'start' | 'center' | 'end'; |
Member
Author
There was a problem hiding this comment.
I chose to add titlePlacement to the toolbar because it controls all the positioning logic, but if we would prefer to add placement as a property on ion-title we could assign it there and pass it up to ion-toolbar.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue number: internal
What is the current behavior?
The
ionictheme currently only supports aligning the toolbar title to the center.What is the new behavior?
titlePlacementproperty to toolbarionictheme as it is the only theme that supports the new center implementation"start"to place the title to the left in LTR and to the right in RTL"center"to center the title within the toolbar"end"to place the title to the right in LTR and to the left in RTLtitle-placementwhich takes screenshots for theionictheme onlyDoes this introduce a breaking change?
Other information
Preview