Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
LayoutApple

Card

Group related native content on a bordered semantic surface with optional card-level action.

Public APILumenCardApple / 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 Card

Use default and muted cards for grouped content, and restrained semantic variants when the surface conveys a real state. Provide a card-level action only when the entire card performs one action.

Card rendered in the iPhone simulator Lumen playground
Verified runtime captureiPhone simulator
swift
LumenCard(variant: .muted) {
    LumenText("Team workspace")
}

Reference

Public API

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

APIValues or typeDefaultDescription
variantdefault · muted · accent · success · warning · destructivedefaultSelects the native surface treatment.
actionOptional callbacknilMakes the whole card interactive.
contentNative contentRequiredComposes the card body.
SwiftUI modifiersNative layout APIControls card placement and sizing.

Native behavior

Design and accessibility

When to use it

Use default and muted cards for grouped content, and restrained semantic variants when the surface conveys a real state. Provide a card-level action only when the entire card performs one action.

Accessibility

Supplying an action gives the card native button semantics. Avoid nesting an interactive card inside another control.

Shared component

Available on other platforms

React NativeAndroid / Compose
Apple docsSwiftUI package