Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
WidgetKitApple

Widget text

Render focused WidgetKit text with native scaling and semantic rendering-mode color.

Public APILumenWidgetTextApple / SwiftUISwift product: LumenWidgetUI

Apple availability

Supported native targets

Import LumenWidgetUI 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 Watch · watchOS 9+

Native example

Use Widget text

Use in WidgetKit extensions that need semantic text without linking the complete LumenUI catalog. Keep family-specific layout in the widget.

Focused package reference

This API ships in LumenWidgetUI. No application-playground capture is published for this extension-only product yet.

swift
LumenWidgetText(
    .verbatim(statusTitle),
    style: .title,
    tone: .accent
)

Reference

Public API

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

APIValues or typeDefaultDescription
contentLumenWidgetTextContentRequiredPreserves localized or verbatim text.
stylebody · caption · label · metric · titlebodyUses a native semantic font.
toneprimary · secondary · accent · success · warning · dangerprimaryAdapts color to the WidgetKit rendering mode.

Native behavior

Design and accessibility

When to use it

Use in WidgetKit extensions that need semantic text without linking the complete LumenUI catalog. Keep family-specific layout in the widget.

Accessibility

Localized or verbatim content preserves native Dynamic Type and adapts semantic tone to WidgetKit rendering modes.

Apple docsSwiftUI package