Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
FoundationsApple

Text

Render native text with shared typography variants and semantic color tones.

Public APILumenTextApple / SwiftUISwift product: LumenUI

Apple availability

Supported native targets

Import LumenUI in the target that uses this component. iPad support follows the iOS package baseline and uses native iPad layout behavior.

iPhone · iOS 16+iPad · iPadOS 16+Mac · macOS 13+Apple TV · tvOS 16+Apple Vision · visionOS 1+Apple Watch · watchOS 9+

Native example

Use Text

Use the title and label roles for hierarchy, not as substitutes for application navigation semantics. Prefer the muted and soft tones for supporting copy.

Text rendered in the iPhone simulator Lumen playground
Verified runtime captureiPhone simulator
swift
LumenText(
    "Welcome back",
    variant: .title,
    tone: .default
)

Reference

Public API

The primary shared and platform-specific options exposed by LumenText.

APIValues or typeDefaultDescription
contentString / native text contentRequiredThe text content.
variantbody · caption · label · titlebodySelects the shared typography role.
tonedefault · soft · muted · success · warning · dangerdefaultSelects a semantic foreground role.
SwiftUI modifiersNative layout or text stylingAdds platform-native layout and presentation overrides.

Native behavior

Design and accessibility

When to use it

Use the title and label roles for hierarchy, not as substitutes for application navigation semantics. Prefer the muted and soft tones for supporting copy.

Accessibility

Text remains native text, supports platform font scaling, and preserves the semantic meaning supplied by its surrounding view.

Shared component

Available on other platforms

React NativeAndroid / Compose
Apple docsSwiftUI package