ThemeTypography
public struct ThemeTypography
Defines a typography scale for use across an application, providing visual hierarchy and consistent font styling.
-
Used for large promotional text or hero sections. Bold and eye-catching.
Declaration
Swift
public let displayLarge: Font -
Slightly smaller than
displayLarge, still used for prominent visual titles.Declaration
Swift
public let displayMedium: Font -
Smallest display style, typically used for titles or hero sections in constrained layouts.
Declaration
Swift
public let displaySmall: Font
-
Large heading for pages or sections. Typically H1.
Declaration
Swift
public let headlineLarge: Font -
Medium heading for sections or nested headers. Typically H2.
Declaration
Swift
public let headlineMedium: Font -
Small heading for titles inside cards or components. Typically H3–H4.
Declaration
Swift
public let headlineSmall: Font
-
Large title used for modals, sheets, or form sections.
Declaration
Swift
public let titleLarge: Font -
Medium title for component headers and UI blocks.
Declaration
Swift
public let titleMedium: Font -
Small title for inputs, lists, or compact titles.
Declaration
Swift
public let titleSmall: Font
-
Label for buttons, tabs, or labeled UI elements (e.g. filters).
Declaration
Swift
public let labelLarge: Font -
Smaller label text, used for secondary buttons, tags, etc.
Declaration
Swift
public let labelMedium: Font -
Very small label for compact UI controls (e.g. chips, input fields).
Declaration
Swift
public let labelSmall: Font
-
Body text used in paragraphs and long-form content.
Declaration
Swift
public let bodyLarge: Font -
Medium body text for standard blocks and list items.
Declaration
Swift
public let bodyMedium: Font -
Compact body text for footnotes, cards, and less prominent content.
Declaration
Swift
public let bodySmall: Font
-
Text used inside buttons or CTA components.
Declaration
Swift
public let buttonText: Font -
Default typography scale using Jakarta font family.
Declaration
Swift
public static let defaultLight: ThemeTypography -
Undocumented
Declaration
Swift
public static let defaultDark: ThemeTypography -
init(displayLarge:displayMedium: displaySmall: headlineLarge: headlineMedium: headlineSmall: titleLarge: titleMedium: titleSmall: labelLarge: labelMedium: labelSmall: bodyLarge: bodyMedium: bodySmall: buttonText: ) Undocumented
Declaration
Swift
public init(displayLarge: Font, displayMedium: Font, displaySmall: Font, headlineLarge: Font, headlineMedium: Font, headlineSmall: Font, titleLarge: Font, titleMedium: Font, titleSmall: Font, labelLarge: Font, labelMedium: Font, labelSmall: Font, bodyLarge: Font, bodyMedium: Font, bodySmall: Font, buttonText: Font) -
copy(displayLarge:displayMedium: displaySmall: headlineLarge: headlineMedium: headlineSmall: titleLarge: titleMedium: titleSmall: labelLarge: labelMedium: labelSmall: bodyLarge: bodyMedium: bodySmall: buttonText: ) Returns a new
ThemeTypographyinstance by copying the current one and overriding the specified text styles.Only provided parameters will be changed; all others will retain their existing values.
Declaration
Swift
func copy( displayLarge: Font? = nil, displayMedium: Font? = nil, displaySmall: Font? = nil, headlineLarge: Font? = nil, headlineMedium: Font? = nil, headlineSmall: Font? = nil, titleLarge: Font? = nil, titleMedium: Font? = nil, titleSmall: Font? = nil, labelLarge: Font? = nil, labelMedium: Font? = nil, labelSmall: Font? = nil, bodyLarge: Font? = nil, bodyMedium: Font? = nil, bodySmall: Font? = nil, buttonText: Font? = nil ) -> ThemeTypographyParameters
displayLargeOverride for
displayLargedisplayMediumOverride for
displayMediumdisplaySmallOverride for
displaySmallheadlineLargeOverride for
headlineLargeheadlineMediumOverride for
headlineMediumheadlineSmallOverride for
headlineSmalltitleLargeOverride for
titleLargetitleMediumOverride for
titleMediumtitleSmallOverride for
titleSmalllabelLargeOverride for
labelLargelabelMediumOverride for
labelMediumlabelSmallOverride for
labelSmallbodyLargeOverride for
bodyLargebodyMediumOverride for
bodyMediumbodySmallOverride for
bodySmallbuttonTextOverride for
buttonTextReturn Value
A new
ThemeTypographywith applied overrides.