Typography
SwiftDS typography is defined by `DSFont` and `DSTextStyle`. The package maps each style to a native SwiftUI text style, then layers weight, tracking, and line spacing where needed.
Text Styles
.largeTitle
Hero headers and major page titles
.largeTitle · Bold · tracking -1.0 · line spacing 2
SwiftDS Design System
.largeTitle
.title
Section titles and prominent headings
.title · Bold · tracking -0.5 · line spacing 2
Build polished interfaces
.title
.title2
Subsection headers and card titles
.title2 · Semibold · tracking 0 · line spacing 2
Foundation Overview
.title2
.headline
High-emphasis labels and grouped content headers
.headline · Semibold · tracking 0 · line spacing 1
Ready to ship
.headline
.body
Default reading text
.body · Regular · tracking 0 · line spacing 5
Use body for the main content of a screen or component.
.body
.bodyMuted
Secondary body copy rendered with muted foreground
.body · Regular · tracking 0 · line spacing 5
Supporting information uses the same scale with softer emphasis.
.body
.callout
Action-adjacent copy and compact summaries
.callout · Medium · tracking 0 · line spacing 1
Call attention to key supporting text.
.callout
.subheadline
Metadata rows and compact supporting text
.subheadline · Medium · tracking 0 · line spacing 1
Updated 2 minutes ago
.subheadline
.caption
Captions and short labels
.caption · Regular · tracking 0 · line spacing 1
Caption text
.caption
.caption2
Tiny metadata and dense helper text
.caption2 · Regular · tracking 0.3 · line spacing 1
Secondary caption
.caption2
.mono
Code, measurements, and technical metadata
.footnote · Regular · tracking 0 · line spacing 1
token.primary = #C4A882
.footnote
.label
Control labels and emphasized inline text
.callout · Medium · tracking 0 · line spacing 1
Primary Action
.callout
.labelSmall
Small labels, badges, and compact UI
.caption · Medium · tracking 0 · line spacing 1
Beta
.caption
DSFont Helpers
DSFont.regular(size:)
DSFont.medium(size:)
DSFont.semibold(size:)
DSFont.bold(size:)
DSFont.mono(size:)
DSFont.rounded(size:)
DSFont.native(_:weight:design:)
Usage
import SwiftUI
DSText("Section title", style: .headline)
Text("Supporting copy")
.dsTextStyle(.bodyMuted)
Text("token.primary = #C4A882")
.dsTextStyle(.mono)
.foregroundStyle(DSColor.primary)
Text("Custom emphasis")
.font(DSFont.rounded(size: DSFont.Size.lg))Dynamic Type
`DSTextStyle` uses native SwiftUI text styles under the hood, so Dynamic Type scaling stays intact. The package then adds style-specific tracking and line spacing without breaking accessibility.