Skip to main content
239

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Themes
Apple docs
AIApple

Approval card

Ask for an approve or reject decision on an application-owned request.

Public APILumenApprovalCardApple / 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 Approval card

The host authorizes and runs the operation, then updates status. Both buttons disable once decided.

Approval card rendered in the iPhone simulator Lumen playground
Captured exampleiPhone simulatorView dark appearance
swift
import LumenUI
import SwiftUI

struct DeployApprovalExample: View {
    @State private var status = LumenApprovalStatus.pending

    var body: some View {
        LumenApprovalCard("Deploy release 6.0.0", requestId: "deploy-6-0-0", status: status,
                          statusLabel: status == .pending ? "Waiting for your decision" : "Decision recorded",
                          onResponse: { _, response in
                              status = response == .approve ? .approved : .rejected
                          }) {
            Text("The assistant wants to publish the docs preview.")
        }
    }
}
Apple
A card that asks a person to approve or reject an action the host then authorizes.

Reference

Public API

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

APIValues or typeDefaultDescription
requestId / status / onResponserequest identity / decision / response callbackrequired / pending / requiredThe host authorizes and runs the operation, then updates status.

Native behavior

Design and accessibility

When to use it

The host authorizes and runs the operation, then updates status. Both buttons disable once decided.

Accessibility

Card named by its label; decision status announced politely.

Shared component

Available on other platforms

React NativeAndroid / Compose Web
Apple docsSwiftUI package