Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
WidgetKitApple

Widget badge

Present a compact rendering-mode-aware WidgetKit status badge.

Public APILumenWidgetBadgeApple / 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 badge

Use for short WidgetKit status. Keep actions as native Button or App Intent interactions outside the badge.

Focused package reference

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

swift
LumenWidgetBadge(
    .verbatim("Ready"),
    iconSystemName: "checkmark.circle.fill",
    tone: .success
)

Reference

Public API

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

APIValues or typeDefaultDescription
labelLumenWidgetTextContentRequiredProvides the compact status text.
iconSystemNameString?nilAdds a decorative SF Symbol.
toneLumenWidgetToneaccentSelects the semantic status treatment.

Native behavior

Design and accessibility

When to use it

Use for short WidgetKit status. Keep actions as native Button or App Intent interactions outside the badge.

Accessibility

Icon and text combine into one concise status, while increased contrast strengthens the visible outline.

Apple docsSwiftUI package