Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
Data displayApple

Badge

Display compact native status and classification labels using semantic tones.

Public APILumenBadgeApple / 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 Badge

Use short status or classification labels. Prefer normal text for sentences, instructions, and frequently changing numeric values.

Badge rendered in the iPhone simulator Lumen playground
Verified runtime captureiPhone simulator
swift
LumenBadge("Active", tone: .success)

Reference

Public API

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

APIValues or typeDefaultDescription
contentString / native textRequiredProvides the visible badge label.
toneneutral · accent · success · warning · dangerneutralSelects the semantic status treatment.
SwiftUI modifiersNative layout APIAdds platform-native layout adjustments.

Native behavior

Design and accessibility

When to use it

Use short status or classification labels. Prefer normal text for sentences, instructions, and frequently changing numeric values.

Accessibility

Badge text remains available to assistive technology. Do not encode status only through tone.

Shared component

Available on other platforms

React NativeAndroid / Compose
Apple docsSwiftUI package