Skip to main content
239

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Themes
Apple docs
Data displayApple

Stat group

Lay out related stats in an adaptive grid.

Public APILumenStatGroupApple / 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 group

Use dividers to join the stats into one frame.

Stat group rendered in the iPhone simulator Lumen playground
Captured exampleiPhone simulatorView dark appearance
swift
import LumenUI
import SwiftUI

struct StatGroupExample: View {
    var body: some View {
        LumenStatGroup("Workspace usage", dividers: true) {
            LumenStat("Projects", value: "42")
            LumenStat("Members", value: "18")
            LumenStat("Storage", value: "64%")
            LumenStat("Builds", value: "312")
        }
    }
}
Apple
Four workspace stats on one framed surface divided by hairlines.

Reference

Public API

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

APIValues or typeDefaultDescription
label / dividers / minimumWidthgroup name / joined frame / column widthrequired / false / 160Use dividers to join the stats into one frame.

Native behavior

Design and accessibility

When to use it

Use dividers to join the stats into one frame.

Accessibility

Named group; each stat keeps its own summary.

Shared component

Available on other platforms

React NativeAndroid / Compose Web
Apple docsSwiftUI package