Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
ActionsApple

Chip

Represent compact selected, actionable, or removable values with native interaction semantics.

Public APILumenChipApple / 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 Chip

Use for compact filters, assigned values, or removable tokens. Use Badge for display-only status and Segmented control for mutually exclusive peer choices.

Chip rendered in the iPhone simulator Lumen playground
Verified runtime captureiPhone simulator
swift
LumenChip(
    "Design",
    selected: selected,
    removeLabel: "Remove Design",
    onPress: { selected.toggle() },
    onRemove: removeDesign
)

Reference

Public API

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

APIValues or typeDefaultDescription
labelStringRequiredProvides visible chip text.
selectedBooleanfalseExposes selected state.
onPressCallback?nilMakes the chip selectable or actionable.
onRemoveCallback?nilAdds a separate removal action.
removeLabelStringRemove labelNames the removal action.

Native behavior

Design and accessibility

When to use it

Use for compact filters, assigned values, or removable tokens. Use Badge for display-only status and Segmented control for mutually exclusive peer choices.

Accessibility

A selectable chip reports selected and disabled state. Its optional removal action remains separately named and operable.

Shared component

Available on other platforms

React NativeAndroid / Compose
Apple docsSwiftUI package