Skip to main content
239

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Themes
React Native docs
AIReact Native

Approval card

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

Public APILumenApprovalCardReact Native

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 Expo web renderer Lumen playground

Captured exampleExpo web renderer

Open interactive preview
Open the Approval card demo
tsx
import { useState } from 'react'
import { LumenApprovalCard, type LumenApprovalStatus } from '@santi020k/lumen-react-native'

export function SendReportApproval() {
  const [status, setStatus] = useState<LumenApprovalStatus>('pending')

  return (
    <LumenApprovalCard
      label="Send the weekly report?"
      onResponse={(_, response) => setStatus(response === 'approve' ? 'approved' : 'rejected')}
      requestId="request-1"
      status={status}
      statusLabel={status === 'pending' ? 'Waiting for your approval' : `Request ${status}`}
    >
      The agent will email the report to 4 people on the launch team.
    </LumenApprovalCard>
  )
}
React Native
Ask before the agent sends an email; the host updates the status after deciding.

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

Apple / SwiftUIAndroid / Compose Web
React Native docsNative primitives