Skip to main content
239

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Themes
Apple docs
WidgetKitApple

Widget progress

Present bounded progress with adaptive text and WidgetKit rendering-mode support.

Public APILumenWidgetProgressApple / 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 progress

Use for determinate snapshots. Keep timeline updates, background work, widget families, and privacy policy in the application.

Widget progress rendered in the iPhone simulator (WidgetKit Home Screen) Lumen playground
Captured exampleiPhone simulator (WidgetKit Home Screen)View dark appearance
swift
LumenWidgetProgress(
    .verbatim("Session"),
    value: 18,
    maximum: 25,
    valueLabel: .verbatim("18 of 25 minutes")
)

Reference

Public API

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

APIValues or typeDefaultDescription
labelLumenWidgetTextContentRequiredNames the progress.
valueDoubleRequiredClamps to the valid range; nonfinite values resolve to zero.
maximumDouble1Sets the upper bound; invalid totals resolve to one.
toneLumenWidgetToneaccentAdapts progress color to the WidgetKit rendering mode.
showsValueBooltrueShows the formatted value without changing accessibility output.
valueLabelLumenWidgetTextContent?nilOverrides the locale-formatted percentage.

Native behavior

Design and accessibility

When to use it

Use for determinate snapshots. Keep timeline updates, background work, widget families, and privacy policy in the application.

Accessibility

Exposes one progress label and value, even when the visible value is hidden. Large text stacks the label and value.

Apple docsSwiftUI package