Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
Data displayApple

Stat

Display a compact product metric with semantic tone and optional supporting context.

Public APILumenStatApple / 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 Stat

Use for a compact product metric. Avoid decorative dashboard numbers that do not support a decision or task.

Stat rendered in the iPhone simulator Lumen playground
Verified runtime captureiPhone simulator
swift
LumenStat(
    "Open windows",
    value: "12",
    detail: "Across 3 workspaces",
    systemName: "macwindow",
    tone: .accent
)

Reference

Public API

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

APIValues or typeDefaultDescription
labelLocalizedStringKeyRequiredNames the metric.
valueStringRequiredProvides the formatted metric value.
detailLocalizedStringKey?nilAdds supporting context.
systemNameSF Symbol name?nilAdds an optional semantic graphic.
toneneutral · brand · accent · success · warning · dangerbrandSelects semantic emphasis.

Native behavior

Design and accessibility

When to use it

Use for a compact product metric. Avoid decorative dashboard numbers that do not support a decision or task.

Accessibility

Metric content is combined into a concise readable unit. The value must remain meaningful without relying on color or icon alone.

Shared component

Available on other platforms

React NativeAndroid / Compose
Apple docsSwiftUI package