When to use it
Use it for headline metrics. Keep the final value meaningful on its own, because reduced motion shows it at once.
Count a formatted number up, or roll odometer reels, the first time it appears.
Apple availability
Import LumenUI in the target that uses this component. iPad support follows the iOS package baseline and uses native iPad layout behavior.
Native example
Use it for headline metrics. Keep the final value meaningful on its own, because reduced motion shows it at once.
import LumenUI
import SwiftUI
struct RevenueMetrics: View {
var body: some View {
HStack(spacing: LumenSpacing.xl) {
VStack(alignment: .leading, spacing: LumenSpacing.xs) {
LumenText("Monthly revenue", variant: .caption, tone: .muted)
LumenAnimatedNumber(48_250, prefix: "$")
.font(.title.weight(.semibold))
}
VStack(alignment: .leading, spacing: LumenSpacing.xs) {
LumenText("Shipping since", variant: .caption, tone: .muted)
LumenAnimatedNumber(2014, grouping: false, variant: .odometer)
.font(.title.weight(.semibold))
}
}
}
}Reference
The primary shared and platform-specific options exposed by LumenAnimatedNumber.
| API | Values or type | Default | Description |
|---|---|---|---|
| value / variant / duration | final number / count or odometer / motion length | required / count / slow (count), scene (odometer) | Use it for headline metrics. |
Native behavior
Use it for headline metrics. Keep the final value meaningful on its own, because reduced motion shows it at once.
Assistive technology reads only the final formatted value.
Shared component