ThemedNavigationTitleModifier
@MainActor
public struct ThemedNavigationTitleModifier : ViewModifier
A view modifier that sets a themed navigation title using your design system’s typography.
This modifier allows applying a custom TextStyleToken and optional Font.Weight
to the navigation title in a consistent way across screens.
- Works with
.navigationBarTitleDisplayMode(.inline) - Compatible with iOS, macOS, and tvOS
Example:
ContentView()
.modifier(ThemedNavigationTitleModifier(title: "Profile", token: .headlineLarge))
Parameters
title
|
The navigation bar title string. |
token
|
The text style token from the theme’s typography (e.g. |
weight
|
Optional override for font weight (e.g. |
-
Declaration
Swift
@MainActor public func body(content: Content) -> some View